Skip to content

Commit

Permalink
fix bug, deafult storage class not passed after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Sucharevich committed Feb 17, 2019
1 parent b16f719 commit 7faf2d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
9 changes: 7 additions & 2 deletions venonactl/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 7faf2d1

Please sign in to comment.