return namespace assigned to --namespace

Signed-off-by: Ashley Schuett <asch@hellofresh.com>
pull/6306/head
Ashley Schuett 6 years ago committed by Ashley Schuett
parent f46df928cf
commit 342f3c75de
No known key found for this signature in database
GPG Key ID: 3C95DF4FAF37DABD

@ -129,6 +129,10 @@ func kubeConfig() genericclioptions.RESTClientGetter {
} }
func getNamespace() string { func getNamespace() string {
if settings.Namespace != "" {
return settings.Namespace
}
if ns, _, err := kubeConfig().ToRawKubeConfigLoader().Namespace(); err == nil { if ns, _, err := kubeConfig().ToRawKubeConfigLoader().Namespace(); err == nil {
return ns return ns
} }

Loading…
Cancel
Save