Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/cmd/kn.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Eventing: Manage event subscriptions and channels. Connect up event sources.
### Options

```
--config string config file (default is $HOME/.kn.yaml)
-h, --help help for kn
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```
Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ kn completion [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_revision.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Revision command group
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_revision_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ kn revision describe NAME [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_revision_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ kn revision get [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Service command group
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_service_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ kn service create NAME --image IMAGE [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_service_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ kn service delete NAME [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_service_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ kn service describe NAME [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_service_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ kn service get [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_service_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ kn service update NAME [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ kn version [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.kn.yaml)
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
```

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.3.1
github.com/spf13/viper v1.3.1 // indirect
github.com/stretchr/objx v0.2.0 // indirect
golang.org/x/net v0.0.0-20190514140710-3ec191127204 // indirect
golang.org/x/oauth2 v0.0.0-20190517181255-950ef44c6e07 // indirect
Expand Down
30 changes: 0 additions & 30 deletions pkg/kn/core/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/knative/client/pkg/kn/commands/service"
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/viper"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
)
Expand Down Expand Up @@ -63,7 +62,6 @@ Eventing: Manage event subscriptions and channels. Connect up event sources.`,
if p.Output != nil {
rootCmd.SetOutput(p.Output)
}
rootCmd.PersistentFlags().StringVar(&commands.CfgFile, "config", "", "config file (default is $HOME/.kn.yaml)")
rootCmd.PersistentFlags().StringVar(&commands.KubeCfgFile, "kubeconfig", "", "kubectl config file (default is $HOME/.kube/config)")

rootCmd.AddCommand(service.NewServiceCommand(p))
Expand All @@ -77,9 +75,7 @@ Eventing: Manage event subscriptions and channels. Connect up event sources.`,
}

func InitializeConfig() {
cobra.OnInitialize(initConfig)
cobra.OnInitialize(initKubeConfig)

}

func initKubeConfig() {
Expand All @@ -97,29 +93,3 @@ func initKubeConfig() {
commands.KubeCfgFile = filepath.Join(home, ".kube", "config")
}
}

// initConfig reads in config file and ENV variables if set.
func initConfig() {
if commands.CfgFile != "" {
// Use config file from the flag.
viper.SetConfigFile(commands.CfgFile)
} else {
// Find home directory.
home, err := homedir.Dir()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}

// Search config in home directory with name ".kn" (without extension).
viper.AddConfigPath(home)
viper.SetConfigName(".kn")
}

viper.AutomaticEnv() // read in environment variables that match

// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())
}
}
5 changes: 0 additions & 5 deletions vendor/github.com/fsnotify/fsnotify/.editorconfig

This file was deleted.

6 changes: 0 additions & 6 deletions vendor/github.com/fsnotify/fsnotify/.gitignore

This file was deleted.

30 changes: 0 additions & 30 deletions vendor/github.com/fsnotify/fsnotify/.travis.yml

This file was deleted.

52 changes: 0 additions & 52 deletions vendor/github.com/fsnotify/fsnotify/AUTHORS

This file was deleted.

Loading