From 7faf2d171e885d7a67a09fd6ed43cb9eea5f3501 Mon Sep 17 00:00:00 2001 From: Oleg Sucharevich Date: Sun, 17 Feb 2019 16:56:33 +0200 Subject: [PATCH] fix bug, deafult storage class not passed after refactor --- package.json | 2 +- venonactl/cmd/install.go | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8555f54c..6c737fe1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "venona", - "version": "0.17.0", + "version": "0.17.1", "description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline", "main": "index.js", "scripts": { diff --git a/venonactl/cmd/install.go b/venonactl/cmd/install.go index 0be4f936..3b014c28 100644 --- a/venonactl/cmd/install.go +++ b/venonactl/cmd/install.go @@ -59,13 +59,18 @@ var installCmd = &cobra.Command{ extendStoreWithKubeClient() builder := plugins.NewBuilder() + isDefault := isUsingDefaultStorageClass(installCmdOptions.storageClass) + builderInstallOpt := &plugins.InstallOptions{ CodefreshHost: s.CodefreshAPI.Host, CodefreshToken: s.CodefreshAPI.Token, ClusterNamespace: s.KubernetesAPI.Namespace, MarkAsDefault: installCmdOptions.setDefaultRuntime, StorageClass: installCmdOptions.storageClass, - IsDefaultStorageClass: isUsingDefaultStorageClass(installCmdOptions.storageClass), + IsDefaultStorageClass: isDefault, + } + if isDefault { + builderInstallOpt.StorageClass = plugins.DefaultStorageClassNamePrefix } if installCmdOptions.kube.context == "" { @@ -114,7 +119,7 @@ var installCmd = &cobra.Command{ Add(plugins.RuntimeEnvironmentPluginType). Add(plugins.VenonaPluginType) } - if isUsingDefaultStorageClass(installCmdOptions.storageClass) { + if isDefault { builder.Add(plugins.VolumeProvisionerPluginType) } else { logrus.Info("Non default StorageClass is set, skipping installation of volume provisioner")