Skip to content

Conversation

@sbulage
Copy link
Collaborator

@sbulage sbulage commented Nov 27, 2025

In this PR, Fleet-92 and Fleet-93 tests overrideTargets option from fleet.yaml. When it is present in the fleet.yaml it overrides GitRepo targets with targets defined in fleet.yaml of matching criteria.

Detailed test case behavior as follows:

  • 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

    • 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

    • 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

@sbulage sbulage self-assigned this Nov 27, 2025
@sbulage sbulage added the automation Add or update automation label Nov 27, 2025
@sbulage sbulage linked an issue Nov 27, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Add or update automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate overrideTargets test

2 participants