You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 17, 2025. It is now read-only.
adding new --exclude-resources-with-label manager CLI argument
Changed default exclusion by label mechanism to use this CLI argument instead of a hardcoded list of labels. Moved the default Rancher label exclusion to be a default CLI argument on the manager. Fixed a bug that caused excluded resources to be propagated with the propagate.hnc.x-k8s.io/all annotation.
Tested: made sure the current test for default exclusion fails after my
CLI argument change, changed the test to reflect the changes, test now passes as
expected. Wrote a test that verifies the propagate.hnc.x-k8s.io/all annotation bug
doesn't occur, which failed before the bugfix. Executed e2e tests and they pass.
Manually tested the manager by adding the new CLI argument and with that a labeled
resource was skipped, then removed the argument and it has propagated. Did the same
with two different annotations specified together as two CLI arguments, and resources that
had any of those labels were skipped as expected. Manually tried to cause an
excluded resource to propagate by adding the propagate.hnc.x-k8s.io/all
annotation, and it didn't propagate.
flag.StringVar(&hncNamespace, "namespace", "hnc-system", "Namespace where hnc-manager and hnc resources deployed")
158
160
flag.DurationVar(&hrqSyncInterval, "hrq-sync-interval", 1*time.Minute, "Frequency to double-check that all HRQ usages are up-to-date (shouldn't be needed)")
161
+
flag.Var(&nopropagationLabel, "nopropagation-label", "A label specified as key=val that, if present, will cause HNC to skip objects that match this label. May be specified multiple times, with each key=value pair specifying one label. See the user guide for more information.")
159
162
flag.Parse()
160
163
161
164
// Assign the array args to the configuration variables after the args are parsed.
0 commit comments