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/checksum-controller/main.go
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,7 @@ This example sharded controller is also useful for developing the sharding compo
80
80
typeoptionsstruct {
81
81
zapOptions*zap.Options
82
82
controllerRingNamestring
83
+
namespacestring
83
84
leaseNamespacestring
84
85
shardNamestring
85
86
}
@@ -92,11 +93,13 @@ func newOptions() *options {
92
93
},
93
94
94
95
controllerRingName: "checksum-controller",
96
+
namespace: metav1.NamespaceDefault,
95
97
}
96
98
}
97
99
98
100
func (o*options) AddFlags(fs*pflag.FlagSet) {
99
101
fs.StringVar(&o.controllerRingName, "controllerring", o.controllerRingName, "Name of the ControllerRing the shard belongs to.")
102
+
fs.StringVar(&o.namespace, "namespace", o.namespace, "Namespace to watch objects in.")
100
103
fs.StringVar(&o.leaseNamespace, "lease-namespace", o.leaseNamespace, "Namespace to use for the shard lease. Defaults to the pod's namespace if running in-cluster.")
101
104
fs.StringVar(&o.shardName, "shard-name", o.shardName, "Name of the shard. Defaults to the instance's hostname.")
0 commit comments