Skip to content

Commit

Permalink
add flag
Browse files Browse the repository at this point in the history
  • Loading branch information
matmerr committed Aug 22, 2024
1 parent 47e630b commit 08d66c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var (
probeAddr string
enableLeaderElection bool
cfgFile string
kubeConfigFileName = ""

rootCmd = &cobra.Command{
Use: "retina-agent",
Expand All @@ -41,6 +42,7 @@ func init() {
rootCmd.Flags().StringVar(&probeAddr, "health-probe-bind-address", ":18081", "The address the probe endpoint binds to.")
rootCmd.Flags().BoolVar(&enableLeaderElection, "leader-elect", false, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
rootCmd.Flags().StringVar(&cfgFile, "config", configFileName, "config file")
rootCmd.Flags().StringVar(&kubeConfigFileName, "kubeconfig", kubeConfigFileName, "kubeconfig file") // this is read during GetConfigOrDie, not explicitly passed to any of our logic
}

func Execute() {
Expand Down

0 comments on commit 08d66c6

Please sign in to comment.