Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func init() {
}

func main() {
var version bool
var metricsAddr string
var enableLeaderElection bool
var probeAddr string
Expand All @@ -77,6 +78,8 @@ func main() {
var certificateNamespace string
var certificateIssuerName string

flag.BoolVar(&version, "version", false,
"Print the version and exit.")
flag.StringVar(&metricsAddr, "metrics-bind-address", "0", "The address the metrics endpoint binds to. "+
"Use :8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable the metrics service.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
Expand All @@ -102,6 +105,10 @@ func main() {
opts.BindFlags(flag.CommandLine)
flag.Parse()

if version {
os.Exit(0)
}

ctrl.SetLogger(ctrlzap.New(ctrlzap.UseFlagOptions(&opts)))

// if the enable-http2 flag is false (the default), http/2 should be disabled
Expand Down
Loading