feat<all> add a function to set namespace of envsetting, to provied easier integration for non-cli projects

Signed-off-by: mike.du  <duliyang@hotmail.com>
pull/7036/head
root 6 years ago committed by mike.du
parent 84de17e7e5
commit 73e2721bd7

@ -121,6 +121,14 @@ func (s *EnvSettings) Namespace() string {
return "default" return "default"
} }
/*
Set the namespace for service integration purpose
provide a way to set namespace for easier integration with non-cli projects
*/
func (s *EnvSettings) SetNamespace(ns string) {
s.namespace = ns
}
//RESTClientGetter gets the kubeconfig from EnvSettings //RESTClientGetter gets the kubeconfig from EnvSettings
func (s *EnvSettings) RESTClientGetter() genericclioptions.RESTClientGetter { func (s *EnvSettings) RESTClientGetter() genericclioptions.RESTClientGetter {
s.configOnce.Do(func() { s.configOnce.Do(func() {

Loading…
Cancel
Save