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.
flag.BoolVar(&testLog, "enable-test-log", false, "Enables test log.")
131
140
flag.BoolVar(&internalCert, "enable-internal-cert-management", false, "Enables internal cert management. See the user guide for more information.")
@@ -139,6 +148,7 @@ func parseFlags() {
139
148
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)")
140
149
flag.Var(&managedNamespaceLabels, "managed-namespace-label", "A regex indicating the labels on namespaces that are managed by HNC. These labels may only be set via the HierarchyConfiguration object. All regexes are implictly wrapped by \"^...$\". This argument can be specified multiple times. See the user guide for more information.")
141
150
flag.Var(&managedNamespaceAnnots, "managed-namespace-annotation", "A regex indicating the annotations on namespaces that are managed by HNC. These annotations may only be set via the HierarchyConfiguration object. All regexes are implictly wrapped by \"^...$\". This argument can be specified multiple times. See the user guide for more information.")
151
+
flag.BoolVar(&webhooksOnly, "webhooks-only", false, "Disables the controllers so HNC can be run in HA webhook mode")
142
152
flag.Parse()
143
153
144
154
// Assign the array args to the configuration variables after the args are parsed.
@@ -148,6 +158,12 @@ func parseFlags() {
148
158
setupLog.Error(err, "Illegal flag values")
149
159
os.Exit(1)
150
160
}
161
+
162
+
// Basic legality checks
163
+
ifwebhooksOnly&&noWebhooks {
164
+
setupLog.Info("Cannot set both --webhooks-only and --no-webhooks")
165
+
os.Exit(1)
166
+
}
151
167
}
152
168
153
169
// enableMetrics returns a function to call from main() to export any remaining metrics when main()
0 commit comments