Unify command line namespace resolution
This change allows the namespace in kubeconfig to be overridden by specifying the namespace in the spec file. If namespace is explicitly provided in the command line flags and the spec file has a different namespace, this will cause an error.
This commit is contained in:
@@ -92,7 +92,7 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string
|
||||
allNamespaces := cmdutil.GetFlagBool(cmd, "all-namespaces")
|
||||
mapper, typer := f.Object()
|
||||
|
||||
cmdNamespace, err := f.DefaultNamespace()
|
||||
cmdNamespace, _, err := f.DefaultNamespace()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user