|
@@ -46,12 +46,14 @@ func main() {
|
|
|
var controllerClass string
|
|
var controllerClass string
|
|
|
var enableLeaderElection bool
|
|
var enableLeaderElection bool
|
|
|
var loglevel string
|
|
var loglevel string
|
|
|
|
|
+ var namespace string
|
|
|
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
|
|
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
|
|
|
flag.StringVar(&controllerClass, "controller-class", "default", "the controller is instantiated with a specific controller name and filters ES based on this property")
|
|
flag.StringVar(&controllerClass, "controller-class", "default", "the controller is instantiated with a specific controller name and filters ES based on this property")
|
|
|
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
|
|
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
|
|
|
"Enable leader election for controller manager. "+
|
|
"Enable leader election for controller manager. "+
|
|
|
"Enabling this will ensure there is only one active controller manager.")
|
|
"Enabling this will ensure there is only one active controller manager.")
|
|
|
flag.StringVar(&loglevel, "loglevel", "info", "loglevel to use, one of: debug, info, warn, error, dpanic, panic, fatal")
|
|
flag.StringVar(&loglevel, "loglevel", "info", "loglevel to use, one of: debug, info, warn, error, dpanic, panic, fatal")
|
|
|
|
|
+ flag.StringVar(&namespace, "namespace", "", "watch external secrets scoped in the provided namespace only")
|
|
|
flag.Parse()
|
|
flag.Parse()
|
|
|
|
|
|
|
|
var lvl zapcore.Level
|
|
var lvl zapcore.Level
|
|
@@ -69,6 +71,7 @@ func main() {
|
|
|
Port: 9443,
|
|
Port: 9443,
|
|
|
LeaderElection: enableLeaderElection,
|
|
LeaderElection: enableLeaderElection,
|
|
|
LeaderElectionID: "external-secrets-controller",
|
|
LeaderElectionID: "external-secrets-controller",
|
|
|
|
|
+ Namespace: namespace,
|
|
|
})
|
|
})
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
setupLog.Error(err, "unable to start manager")
|
|
setupLog.Error(err, "unable to start manager")
|