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
See kubernetes-retired#47. This is the initial implementation of managed labels and
annotations - that is, the ability to set a label (or annotation) in a
HierarchyConfiguration object, and have that label (...) propagated to
all descendants, similar to the way objects are propagated. As with
objects, only allowlisted labels are propagated, as defined by the
command line option '--managed-namespace-[labels|annotations]'.
Still to come: validator support, better conditions for conflicts,
better testing for external namespaces.
Tested: see new integ tests.
Copy file name to clipboardExpand all lines: cmd/manager/main.go
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,8 @@ var (
65
65
restartOnSecretRefreshbool
66
66
unpropagatedAnnotationsarrayArg
67
67
excludedNamespacesarrayArg
68
+
managedNamespaceLablesarrayArg
69
+
managedNamespaceAnnotsarrayArg
68
70
includedNamespacesRegexstring
69
71
)
70
72
@@ -99,11 +101,29 @@ func main() {
99
101
flag.Var(&excludedNamespaces, "excluded-namespace", "A namespace that, if present, will be excluded from HNC management. May be specified multiple times, with each instance specifying one namespace. See the user guide for more information.")
100
102
flag.StringVar(&includedNamespacesRegex, "included-namespace-regex", ".*", "Namespace regular expression. Namespaces that match this regexp will be included and handle by HNC. As it is a regex, this parameter cannot be specified multiple times. Implicit wrapping of the expression \"^...$\" is done here")
101
103
flag.BoolVar(&restartOnSecretRefresh, "cert-restart-on-secret-refresh", false, "Kills the process when secrets are refreshed so that the pod can be restarted (secrets take up to 60s to be updated by running pods)")
104
+
flag.Var(&managedNamespaceLables, "managed-namespace-labels", "A list of labels on namespaces that are managed by HNC. These labels may only be set via the HierarchyConfiguration object. See the user guide for more information.")
105
+
flag.Var(&managedNamespaceAnnots, "managed-namespace-annotations", "A list of annotations on namespaces that are managed by HNC. These labels may only be set via the HierarchyConfiguration object. See the user guide for more details.")
102
106
flag.Parse()
107
+
103
108
// Assign the array args to the configuration variables after the args are parsed.
0 commit comments