Skip to content

Commit

Permalink
Fix CLI options (#205)
Browse files Browse the repository at this point in the history
Fix the CLI options that were changed but not in all places necessary.
  • Loading branch information
mergify[bot] authored Dec 3, 2022
2 parents 148598b + 7eadfe4 commit 641a6b5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ type RootCommandOptions struct {

Backend string `mapstructure:"backend"`

KubeAPIServerAddress string `mapstructure:"kubernetes"`
Kubeconfig string `mapstructure:"kubeconfig"`
KubeNamespace string `mapstructure:"kube-namespace"`
KubernetesAPIServer string `mapstructure:"kubernetes-apiserver"`
KubernetesKubeconfig string `mapstructure:"kubernetes-kubeconfig"`
KubernetesNamespace string `mapstructure:"kubernetes-namespace"`

FlatfilePath string `mapstructure:"flatfile-path"`

Expand Down Expand Up @@ -140,7 +140,7 @@ func (c *RootCommand) configureFlags() error {

// Kubernetes backend specific flags.
c.Flags().String("kubernetes-kubeconfig", "", "Path to a kubeconfig file")
c.Flags().String("kubernetes-apiserver-endpoint", "", "URL of the Kubernetes API Server")
c.Flags().String("kubernetes-apiserver", "", "URL of the Kubernetes API Server")
c.Flags().String("kubernetes-namespace", "", "The Kubernetes namespace to target; defaults to the service account")

// Flatfile backend specific flags.
Expand Down Expand Up @@ -184,9 +184,9 @@ func toBackendOptions(opts RootCommandOptions) backend.Options {
case "kubernetes":
backndOpts = backend.Options{
Kubernetes: &backend.KubernetesOptions{
APIServerAddress: opts.KubeAPIServerAddress,
Kubeconfig: opts.Kubeconfig,
Namespace: opts.KubeNamespace,
APIServerAddress: opts.KubernetesAPIServer,
Kubeconfig: opts.KubernetesKubeconfig,
Namespace: opts.KubernetesNamespace,
},
}
}
Expand Down

0 comments on commit 641a6b5

Please sign in to comment.