Skip to content

Commit

Permalink
Fix CLI options
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Doherty <[email protected]>
  • Loading branch information
chrisdoherty4 committed Dec 3, 2022
1 parent 148598b commit 7eadfe4
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 7eadfe4

Please sign in to comment.