feat: namespace globally configurable (#1352)

* namespace global config

* integrate namespace config into commands

* comment updates

* combine config write tests

* updates per code review

* regen docs
This commit is contained in:
Luke Kingland 2022-11-01 03:07:12 +09:00 committed by GitHub
parent b1873083cb
commit 0fa9359750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 156 additions and 132 deletions

View File

@ -43,8 +43,9 @@ No local files are deleted.
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Flag
// Flags
cmd.Flags().BoolP("confirm", "c", cfg.Confirm, "Prompt to confirm all configuration options (Env: $FUNC_CONFIRM)")
cmd.Flags().StringP("namespace", "n", "", "The namespace in which to delete. (Env: $FUNC_NAMESPACE)")
cmd.Flags().StringP("all", "a", "true", "Delete all resources created for a function, eg. Pipelines, Secrets, etc. (Env: $FUNC_ALL) (allowed values: \"true\", \"false\")")
setPathFlag(cmd)

View File

@ -729,9 +729,13 @@ func namespace(cfg deployConfig, f fn.Function, stderr io.Writer) (namespace str
} else if f.Deploy.Namespace != "" {
namespace = f.Deploy.Namespace // value from previous deployment (func.yaml) 2nd priority
} else {
// Try to derive a default from the current k8s context, if any.
if namespace, err = k8s.GetNamespace(""); err != nil {
fmt.Fprintln(stderr, "Warning: no namespace provided, and none currently active. Continuing to attempt deployment")
// If global config setting exists, use that, followed by the active
// k8s namesapce if not set.
gc, err := config.NewDefault()
if err != nil {
fmt.Fprintf(stderr, "warning: error reading global config.%v", err)
} else {
namespace = gc.Namespace
}
}

View File

@ -35,7 +35,9 @@ the current directory or from the directory specified with --path.
PreRunE: bindEnv("output", "path"),
}
// Flags
cmd.Flags().StringP("output", "o", "human", "Output format (human|plain|json|xml|yaml|url) (Env: $FUNC_OUTPUT)")
cmd.Flags().StringP("namespace", "n", "", "The namespace in which to look for the named function. (Env: $FUNC_NAMESPACE)")
setPathFlag(cmd)
if err := cmd.RegisterFlagCompletionFunc("output", CompleteOutputFormatList); err != nil {

View File

@ -38,7 +38,9 @@ Lists all deployed functions in a given namespace.
PreRunE: bindEnv("all-namespaces", "output"),
}
// Flags
cmd.Flags().BoolP("all-namespaces", "A", false, "List functions in all namespaces. If set, the --namespace flag is ignored.")
cmd.Flags().StringP("namespace", "n", "", "The namespace for which to list functions. (Env: $FUNC_NAMESPACE)")
cmd.Flags().StringP("output", "o", "human", "Output format (human|plain|json|xml|yaml) (Env: $FUNC_OUTPUT)")
if err := cmd.RegisterFlagCompletionFunc("output", CompleteOutputFormatList); err != nil {

View File

@ -339,7 +339,6 @@ func runRepositoryAdd(_ *cobra.Command, args []string, newClient ClientFactory)
// be created in XDG_CONFIG_HOME/func even if the repo path environment
// was set to some other location on disk.
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
// Preconditions

View File

@ -74,10 +74,6 @@ EXAMPLES
if err := viper.BindPFlag("verbose", cmd.PersistentFlags().Lookup("verbose")); err != nil {
fmt.Fprintf(os.Stderr, "error binding flag: %v\n", err)
}
cmd.PersistentFlags().StringP("namespace", "n", "", "The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)")
if err := viper.BindPFlag("namespace", cmd.PersistentFlags().Lookup("namespace")); err != nil {
fmt.Fprintf(os.Stderr, "error binding flag: %v\n", err)
}
// Version
cmd.Version = config.Version.String()

View File

@ -19,22 +19,29 @@ import (
func TestRoot_PersistentFlags(t *testing.T) {
tests := []struct {
name string
args []string
skipNamespace bool
name string
args []string
expected bool
}{
{
name: "provided as root flags",
args: []string{"--verbose", "--namespace=namespace", "list"},
name: "not provided",
args: []string{"list"},
expected: false,
},
{
name: "provided as sub-command flags",
args: []string{"list", "--verbose", "--namespace=namespace"},
name: "provided as root flags",
args: []string{"--verbose", "list"},
expected: true,
},
{
name: "provided as sub-sub-command flags",
args: []string{"repositories", "list", "--verbose"},
skipNamespace: true, // NOTE: no sub-sub commands yet use namespace, so it is not checked.
name: "provided as sub-command flags",
args: []string{"list", "--verbose"},
expected: true,
},
{
name: "provided as sub-sub-command flags",
args: []string{"repositories", "list", "--verbose"},
expected: true,
},
}
@ -51,11 +58,8 @@ func TestRoot_PersistentFlags(t *testing.T) {
// Assert the persistent variables were propagated to the Client constructor
// when the command is actually invoked.
cmd = NewRootCmd(RootCommandConfig{NewClient: func(cfg ClientConfig, _ ...fn.Option) (*fn.Client, func()) {
if cfg.Namespace != "namespace" && !tt.skipNamespace {
t.Fatal("namespace not propagated")
}
if cfg.Verbose != true {
t.Fatal("verbose not propagated")
if cfg.Verbose != tt.expected {
t.Fatal("verbose persistent flag not propagated correctly")
}
return fn.New(), func() {}
}})

View File

@ -7,6 +7,7 @@ import (
"gopkg.in/yaml.v2"
"knative.dev/func/builders"
"knative.dev/func/k8s"
)
const (
@ -23,19 +24,31 @@ const (
DefaultBuilder = builders.Default
)
// DefaultNamespace for remote operations is the currently active
// context namespace (if available) or the fallback "default".
func DefaultNamespace() (namespace string) {
var err error
if namespace, err = k8s.GetNamespace(""); err != nil {
return "default"
}
return
}
// Global configuration settings.
type Config struct {
Builder string `yaml:"builder,omitempty"`
Confirm bool `yaml:"confirm,omitempty"`
Language string `yaml:"language,omitempty"`
Builder string `yaml:"builder,omitempty"`
Confirm bool `yaml:"confirm,omitempty"`
Language string `yaml:"language,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
}
// New Config struct with all members set to static defaults. See NewDefaults
// for one which further takes into account the optional config file.
func New() Config {
return Config{
Language: DefaultLanguage,
Builder: DefaultBuilder,
Builder: DefaultBuilder,
Language: DefaultLanguage,
Namespace: DefaultNamespace(),
// ...
}
}
@ -105,7 +118,7 @@ func File() string {
return path
}
// RepositoriesPath returns the full at which to look for repositories.
// RepositoriesPath returns the full path at which to look for repositories.
// Use FUNC_REPOSITORIES_PATH to override default.
func RepositoriesPath() string {
path := filepath.Join(Dir(), Repositories)

View File

@ -24,7 +24,7 @@ func TestNewDefaults(t *testing.T) {
// in from a config file at path, and in this case (unlike NewDefault) the
// file must exist at path or error.
func TestLoad(t *testing.T) {
cfg, err := config.Load("testdata/func/config.yaml")
cfg, err := config.Load(filepath.Join("testdata", "TestLoad", "func", "config.yaml"))
if err != nil {
t.Fatal(err)
}
@ -39,33 +39,34 @@ func TestLoad(t *testing.T) {
}
}
// TestSave ensures that saving an update config persists.
func TestSave(t *testing.T) {
// mktmp
root, rm := Mktemp(t)
defer rm()
// TestWrite ensures that writing a config persists.
func TestWrite(t *testing.T) {
root, cleanup := Mktemp(t)
t.Cleanup(cleanup)
t.Setenv("XDG_CONFIG_HOME", root)
var err error
// touch config.yaml
filename := filepath.Join(root, "config.yaml")
// update
// Ensure error writing when config paths do not exist
cfg := config.New()
cfg.Language = "testSave"
cfg.Language = "example"
if err = cfg.Write(config.File()); err == nil {
t.Fatal("did not receive error writing to a nonexistent path")
}
// save
if err := cfg.Write(filename); err != nil {
// Create the path and ensure writing generates no error
if err = config.CreatePaths(); err != nil {
t.Fatal(err)
}
if err = cfg.Write(config.File()); err != nil {
t.Fatal(err)
}
// reload
cfg, err := config.Load(filename)
if err != nil {
// Confirm value was persisted
if cfg, err = config.Load(config.File()); err != nil {
t.Fatal(err)
}
// assert persisted
if cfg.Language != "testSave" {
t.Fatalf("config did not persist. expected 'testSave', got '%v'", cfg.Language)
if cfg.Language != "example" {
t.Fatalf("config did not persist. expected 'example', got '%v'", cfg.Language)
}
}
@ -140,7 +141,6 @@ func TestCreatePaths(t *testing.T) {
if err := config.CreatePaths(); err == nil {
t.Fatal("did not receive error when creating paths in an invalid home")
}
}
// TestNewDefault_ConfigNotRequired ensures that when creating a new
@ -171,26 +171,27 @@ func TestRepositoriesPath(t *testing.T) {
}
}
// TestWrite ensures that a config is written to the given path and errors
// are returned correctly when the path does not exist.
func TestWrite(t *testing.T) {
// TestDefaultNamespace ensures that, when there is a problem determining the
// active namespace, the static DefaultNamespace ("default") is used and that
// the currently active k8s namespace is used as the default if available.
func TestDefaultNamespace(t *testing.T) {
cwd := Cwd() // store for use after Mktemp which changes working directory
// Namespace "default" when empty home
// Note that KUBECONFIG must be defined, or the current user's ~/.kube/config
// will be used (and thus whichever namespace they have currently active)
home, cleanup := Mktemp(t)
t.Cleanup(cleanup)
t.Setenv("KUBECONFIG", filepath.Join(t.TempDir(), "nonexistent"))
t.Setenv("XDG_CONFIG_HOME", home)
cfg := config.New()
cfg.Language = "example"
// First try writing to a nonexistent path
if err := cfg.Write(config.File()); err == nil {
t.Fatal("did not receive error writing to a nonexistent path")
if config.DefaultNamespace() != "default" {
t.Fatalf("did not receive expected default namespace 'default', got '%v'", config.DefaultNamespace())
}
// Create the path and try again
if err := config.CreatePaths(); err != nil {
t.Fatal(err)
}
if err := cfg.Write(config.File()); err != nil {
t.Fatal(err)
// should be "func" when active k8s namespace is "func"
kubeconfig := filepath.Join(cwd, "testdata", "TestDefaultNamespace", "kubeconfig")
t.Setenv("KUBECONFIG", kubeconfig)
if config.DefaultNamespace() != "func" {
t.Fatalf("expected default namespace of 'func' when that is the active k8s namespace. Got '%v'", config.DefaultNamespace())
}
}

View File

@ -0,0 +1,25 @@
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://cluster.example.com:6443
name: cluster.example.com:6443
contexts:
- context:
cluster: cluster.example.com:6443
namespace: default
user: kube:admin/cluster.example.com:6443
name: default/cluster.example.com:6443/kube:admin
- context:
cluster: cluster.example.com:6443
namespace: func
user: kube:admin/cluster.example.com:6443
name: func/cluster.example.com:6443/kube:admin
current-context: func/cluster.example.com:6443/kube:admin
kind: Config
preferences: {}
users:
- name: kubeadmin
user:
token: sha256~XXXXexample-test-hash

View File

@ -0,0 +1 @@
language: custom

View File

@ -30,9 +30,8 @@ EXAMPLES
### Options
```
-h, --help help for func
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-h, --help help for func
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -58,8 +58,7 @@ func build --builder=pack --builder-image cnbs/sample-builder:bionic
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -31,8 +31,7 @@ func completion <bash|zsh|fish>
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -25,8 +25,7 @@ func config
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -25,8 +25,7 @@ func config envs
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -50,8 +50,7 @@ func config envs add --value='{{ configMap:confMapName }}'
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -24,8 +24,7 @@ func config envs remove
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -24,8 +24,7 @@ func config labels
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -27,8 +27,7 @@ func config labels add
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -24,8 +24,7 @@ func config labels remove
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -24,8 +24,7 @@ func config volumes
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -24,8 +24,7 @@ func config volumes add
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -24,8 +24,7 @@ func config volumes remove
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -78,8 +78,7 @@ func create
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -32,17 +32,17 @@ func delete -n apps myfunc
### Options
```
-a, --all string Delete all resources created for a function, eg. Pipelines, Secrets, etc. (Env: $FUNC_ALL) (allowed values: "true", "false") (default "true")
-c, --confirm Prompt to confirm all configuration options (Env: $FUNC_CONFIRM)
-h, --help help for delete
-p, --path string Path to the project directory (Env: $FUNC_PATH) (default ".")
-a, --all string Delete all resources created for a function, eg. Pipelines, Secrets, etc. (Env: $FUNC_ALL) (allowed values: "true", "false") (default "true")
-c, --confirm Prompt to confirm all configuration options (Env: $FUNC_CONFIRM)
-h, --help help for delete
-n, --namespace string The namespace in which to delete. (Env: $FUNC_NAMESPACE)
-p, --path string Path to the project directory (Env: $FUNC_PATH) (default ".")
```
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -29,16 +29,16 @@ func info --output yaml --path myotherfunc
### Options
```
-h, --help help for info
-o, --output string Output format (human|plain|json|xml|yaml|url) (Env: $FUNC_OUTPUT) (default "human")
-p, --path string Path to the project directory (Env: $FUNC_PATH) (default ".")
-h, --help help for info
-n, --namespace string The namespace in which to look for the named function. (Env: $FUNC_NAMESPACE)
-o, --output string Output format (human|plain|json|xml|yaml|url) (Env: $FUNC_OUTPUT) (default "human")
-p, --path string Path to the project directory (Env: $FUNC_PATH) (default ".")
```
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -111,8 +111,7 @@ func invoke
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -53,8 +53,7 @@ func languages
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -31,16 +31,16 @@ func list --all-namespaces --output json
### Options
```
-A, --all-namespaces List functions in all namespaces. If set, the --namespace flag is ignored.
-h, --help help for list
-o, --output string Output format (human|plain|json|xml|yaml) (Env: $FUNC_OUTPUT) (default "human")
-A, --all-namespaces List functions in all namespaces. If set, the --namespace flag is ignored.
-h, --help help for list
-n, --namespace string The namespace for which to list functions. (Env: $FUNC_NAMESPACE)
-o, --output string Output format (human|plain|json|xml|yaml) (Env: $FUNC_OUTPUT) (default "human")
```
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -135,8 +135,7 @@ func repository
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -16,8 +16,7 @@ func repository add <name> <url>
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -15,8 +15,7 @@ func repository list
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -16,8 +16,7 @@ func repository remove <name>
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -16,8 +16,7 @@ func repository rename <old> <new>
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -52,8 +52,7 @@ func run --build=false
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -54,8 +54,7 @@ func templates
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -36,8 +36,7 @@ func version
### Options inherited from parent commands
```
-n, --namespace string The namespace on the cluster used for remote commands. By default, the namespace func.yaml is used or the currently active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO