-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Automate test which will override the GitRepo targets with targets mentioned in fleet.yaml.
-
Fleet-92
-
Add below target details in
fleet.yaml. -
fleet.yaml
defaultNamespace: nginx-override overrideTargets: - clusterSelector: matchLabels: env: override
-
Create a GitRepo which will target to all available clusters.
-
Verify that
GitRepowill show banner messageThis GitRepo is not targeting any clusters -
Fleet will not create any resources/bundles because
fleet.yamlfile containsoverrideTargets -
overrideTargetsoption will override GitRepo targets and create bundles/resources to cluster with matching criteria.
-
-
Fleet-93
-
fleet.yaml
defaultNamespace: nginx-override overrideTargets: - clusterSelector: matchLabels: env: override
-
Create a GitRepo which will target to all available clusters.
-
Verify that
GitRepowill show banner messageThis GitRepo is not targeting any clusters -
Add label to one of the cluster or all clusters mentioned in above
fleet.yamlfile. -
GitRepo now create bundle as well as resources to the cluster(s) by overriding
GitRepotargets. -
In this tests, label on the cluster are matched to the label from the
fleet.yamlfile, which allows Fleet to create bundle and install resources.
-
For more documentation about overrideTargets, click here