* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package plugin
import (
// Install a given helm chart
func (hc *HelmClient) installChart(helmPkg bytes.Buffer) (string, error) {
- hc.logger.Info("Inside helm client")
+ hc.logger.Debug("Inside helm client")
// Create temporary file to hold helm chart
file, err := os.Create(chartPath + "temp.tar.gz")
actionConfig := new(action.Configuration)
if err := actionConfig.Init(kube.GetConfig(hc.kubeconfig, "", releaseNamespace), releaseNamespace,
os.Getenv("HELM_DRIVER"), func(format string, v ...interface{}) {
- fmt.Sprintf(format, v)
+ fmt.Sprintf(format, v)
}); err != nil {
hc.logger.Errorf("Unable to initialize action config Err: %s", err)
return "", err
- }
+ }
// Prepare chart install action and install chart
installer := action.NewInstall(actionConfig)
actionConfig := new(action.Configuration)
if err := actionConfig.Init(kube.GetConfig(hc.kubeconfig, "", releaseNamespace), releaseNamespace,
os.Getenv("HELM_DRIVER"), func(format string, v ...interface{}) {
- fmt.Sprintf(format, v)
+ fmt.Sprintf(format, v)
}); err != nil {
hc.logger.Errorf("Unable to initialize action config Err: %s", err)
return err
- }
+ }
ui := action.NewUninstall(actionConfig)
res, err := ui.Run(relName);
actionConfig := new(action.Configuration)
if err := actionConfig.Init(kube.GetConfig(hc.kubeconfig, "", releaseNamespace), releaseNamespace,
os.Getenv("HELM_DRIVER"), func(format string, v ...interface{}) {
- fmt.Sprintf(format, v)
- }); err != nil {
+ fmt.Sprintf(format, v)
+ }); err != nil {
hc.logger.Errorf("Unable to initialize action config Err: %s", err)
return "", err
}
return false, err
}
return !info.IsDir(), nil
-}
-
+}
\ No newline at end of file