Skip to content

Commit

Permalink
Merge pull request #273 from alecmerdler/PROJQUAY-867
Browse files Browse the repository at this point in the history
Single Namespace Mode
  • Loading branch information
alecmerdler authored Aug 17, 2020
2 parents 549cf7c + 2983939 commit da8e7e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ func init() {
func main() {
var metricsAddr string
var enableLeaderElection bool
var namespace string
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.StringVar(&namespace, "namespace", "", "The Kubernetes namespace that the controller will watch.")
flag.Parse()

ctrl.SetLogger(zap.New(zap.UseDevMode(true)))
Expand All @@ -60,6 +62,7 @@ func main() {
Port: 9443,
LeaderElection: enableLeaderElection,
LeaderElectionID: "7daa4ab6.quay.redhat.com",
Namespace: namespace,
})
if err != nil {
setupLog.Error(err, "unable to start manager")
Expand Down

0 comments on commit da8e7e3

Please sign in to comment.