Skip to content

Commit

Permalink
Add Kubernetes shorthand k to init, list and logs cli commands (#282)
Browse files Browse the repository at this point in the history
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
  • Loading branch information
CarlosLanderas and artursouza committed Feb 25, 2020
1 parent e70f84b commit b482ac1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/init.go
Expand Up @@ -51,7 +51,7 @@ var InitCmd = &cobra.Command{
}

func init() {
InitCmd.Flags().BoolVar(&kubernetesMode, "kubernetes", false, "Deploy Dapr to a Kubernetes cluster")
InitCmd.Flags().BoolVarP(&kubernetesMode, "kubernetes", "k", false, "Deploy Dapr to a Kubernetes cluster")
InitCmd.Flags().StringVarP(&runtimeVersion, "runtime-version", "", "latest", "The version of the Dapr runtime to install. for example: v0.1.0-alpha")
InitCmd.Flags().String("network", "", "The Docker network on which to deploy the Dapr runtime")
InitCmd.Flags().String("install-path", "", "The optional location to install Dapr to. The default is /usr/local/bin for Linux/Mac and C:\\dapr for Windows")
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Expand Up @@ -59,6 +59,6 @@ var ListCmd = &cobra.Command{
}

func init() {
ListCmd.Flags().BoolVar(&kubernetesMode, "kubernetes", false, "List all Dapr pods in a k8s cluster")
ListCmd.Flags().BoolVarP(&kubernetesMode, "kubernetes", "k", false, "List all Dapr pods in a k8s cluster")
RootCmd.AddCommand(ListCmd)
}
2 changes: 1 addition & 1 deletion cmd/logs.go
Expand Up @@ -32,7 +32,7 @@ var LogsCmd = &cobra.Command{
}

func init() {
LogsCmd.Flags().BoolVar(&k8s, "kubernetes", true, "Only works with a Kubernetes cluster")
LogsCmd.Flags().BoolVarP(&k8s, "kubernetes", "k", true, "Only works with a Kubernetes cluster")
LogsCmd.Flags().StringVarP(&logsAppID, "app-id", "a", "", "The app id for which logs are needed")
LogsCmd.Flags().StringVarP(&podName, "pod-name", "p", "", "(optional) Name of the Pod. Use this in case you have multiple app instances (Pods)")
LogsCmd.Flags().StringVarP(&namespace, "namespace", "n", "", "(optional) Kubernetes namespace in which your application is deployed. default value is 'default'")
Expand Down

0 comments on commit b482ac1

Please sign in to comment.