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
Copy file name to clipboardExpand all lines: cmd/api-syncagent/options.go
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ import (
26
26
27
27
"k8s.io/apimachinery/pkg/labels"
28
28
utilerrors "k8s.io/apimachinery/pkg/util/errors"
29
+
"k8s.io/apimachinery/pkg/util/sets"
29
30
"k8s.io/apimachinery/pkg/util/validation"
30
31
)
31
32
@@ -68,6 +69,8 @@ type Options struct {
68
69
69
70
MetricsAddrstring
70
71
HealthAddrstring
72
+
73
+
DisabledControllers []string
71
74
}
72
75
73
76
funcNewOptions() *Options {
@@ -91,6 +94,7 @@ func (o *Options) AddFlags(flags *pflag.FlagSet) {
91
94
flags.StringVar(&o.KubeconfigCAFileOverride, "kubeconfig-ca-file-override", o.KubeconfigCAFileOverride, "override the server CA file configured in the local kubeconfig")
92
95
flags.StringVar(&o.MetricsAddr, "metrics-address", o.MetricsAddr, "host and port to serve Prometheus metrics via /metrics (HTTP)")
93
96
flags.StringVar(&o.HealthAddr, "health-address", o.HealthAddr, "host and port to serve probes via /readyz and /healthz (HTTP)")
97
+
flags.StringSliceVar(&o.DisabledControllers, "disabled-controllers", o.DisabledControllers, fmt.Sprintf("comma-separated list of controllers (out of %v) to disable (can be given multiple times)", sets.List(availableControllers)))
94
98
}
95
99
96
100
func (o*Options) Validate() error {
@@ -124,6 +128,13 @@ func (o *Options) Validate() error {
0 commit comments