@ -210,9 +210,7 @@ func (c *Configuration) recordRelease(r *release.Release) {
}
}
// InitActionConfig initializes the action configuration
// InitActionConfig initializes the action configuration
func InitActionConfig ( envSettings * cli . EnvSettings , allNamespaces bool , helmDriver string , log DebugLog ) ( * Configuration , error ) {
func ( c * Configuration ) Init ( envSettings * cli . EnvSettings , allNamespaces bool , helmDriver string , log DebugLog ) error {
var actionConfig Configuration
kubeconfig := envSettings . KubeConfig ( )
kubeconfig := envSettings . KubeConfig ( )
kc := kube . New ( kubeconfig )
kc := kube . New ( kubeconfig )
@ -220,7 +218,7 @@ func InitActionConfig(envSettings *cli.EnvSettings, allNamespaces bool, helmDriv
clientset , err := kc . Factory . KubernetesClientSet ( )
clientset , err := kc . Factory . KubernetesClientSet ( )
if err != nil {
if err != nil {
return nil , err
return err
}
}
var namespace string
var namespace string
if ! allNamespaces {
if ! allNamespaces {
@ -245,10 +243,10 @@ func InitActionConfig(envSettings *cli.EnvSettings, allNamespaces bool, helmDriv
panic ( "Unknown driver in HELM_DRIVER: " + helmDriver )
panic ( "Unknown driver in HELM_DRIVER: " + helmDriver )
}
}
a ctionConfig . RESTClientGetter = kubeconfig
c. RESTClientGetter = kubeconfig
a ctionConfig . KubeClient = kc
c. KubeClient = kc
a ctionConfig . Releases = store
c. Releases = store
a ctionConfig . Log = log
c. Log = log
return & actionConfig , nil
return nil
}
}