Skip to content

Automate overrideTargets test #424

@sbulage

Description

@sbulage

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 GitRepo will show banner message This GitRepo is not targeting any clusters

    • Fleet will not create any resources/bundles because fleet.yaml file contains overrideTargets

    • overrideTargets option 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 GitRepo will show banner message This GitRepo is not targeting any clusters

    • Add label to one of the cluster or all clusters mentioned in above fleet.yaml file.

    • GitRepo now create bundle as well as resources to the cluster(s) by overriding GitRepo targets.

    • In this tests, label on the cluster are matched to the label from the fleet.yaml file, which allows Fleet to create bundle and install resources.

For more documentation about overrideTargets, click here

Metadata

Metadata

Assignees

Labels

automationAdd or update automation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions