Skip to content

Commit

Permalink
change the kube config flag to align with kubectl (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchcrab authored Aug 28, 2021
1 parent 5708daf commit 97f552a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Allow setting the cluster context via the --context flag.

### Changed

- Align the kube config flag with kubectl.

## [0.5.0] - 2021-08-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ INFO[0000] resources deleted: deployment, podsecuritypolicy, clusterrolebinding,
### Global flags

```
--kube-config (default: '/home/$user/.kube/config')
--kubeconfig (default: '/home/$user/.kube/config')
Absolute path to the kubeconfig file to use.
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ suit the target cluster configuration.
Global flags:
--kube-config (default: '/home/$user/.kube/config')
--kubeconfig (default: '/home/$user/.kube/config')
Absolute path to the kubeconfig file to use.
Expand Down Expand Up @@ -82,7 +82,7 @@ func Execute() {
func init() {
cobra.OnInitialize(initConfig)

rootCmd.PersistentFlags().StringVar(&kubeConfig, "kube-config", "", "absolute path to kubeconfig file (default: '$HOME/.kube/config')")
rootCmd.PersistentFlags().StringVar(&kubeConfig, "kubeconfig", "", "absolute path to kubeconfig file (default: '/home/$user/.kube/config')")
rootCmd.PersistentFlags().StringVar(&kubeContext, "context", "", "context to use")
rootCmd.PersistentFlags().StringVarP(&name, "name", "N", "debug", "resource name (max 50 characters) (automatically prepended with 'sonar-'")
rootCmd.PersistentFlags().StringVarP(&namespace, "namespace", "n", "default", "namespace to operate in")
Expand Down

0 comments on commit 97f552a

Please sign in to comment.