feat<all> add a function to set namespace of envsetting

Signed-off-by: mike.du <duliyang@hotmail.com>
pull/7037/head
mike.du 6 years ago
parent 84de17e7e5
commit ff57dc608b

@ -121,6 +121,11 @@ func (s *EnvSettings) Namespace() string {
return "default" return "default"
} }
//set the namespace of envsetting, provide easier integration for 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