diff --git a/package.json b/package.json index 03d56d0c..05c0f9a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "venona", - "version": "0.28.3", + "version": "0.28.4", "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 45baf959..6b146dba 100644 --- a/venonactl/cmd/install.go +++ b/venonactl/cmd/install.go @@ -225,10 +225,10 @@ func parseNodeSelector(s string) (nodeSelector, error) { func validateInstallOptions(opts* plugins.InstallOptions) (error) { if len(opts.ClusterName) > clusterNameMaxLength { - return errors.New(fmt.Sprintf("cluster name lenght is limited to %d", clusterNameMaxLength)) + return errors.New(fmt.Sprintf("cluster name length is limited to %d", clusterNameMaxLength)) } if len(opts.ClusterNamespace) > namespaceMaxLength { - return errors.New(fmt.Sprintf("cluster namespace is limited to %d", namespaceMaxLength)) + return errors.New(fmt.Sprintf("cluster namespace length is limited to %d", namespaceMaxLength)) } return nil } diff --git a/venonactl/pkg/plugins/volume-provisioner.go b/venonactl/pkg/plugins/volume-provisioner.go index cfc927a7..e670ea00 100644 --- a/venonactl/pkg/plugins/volume-provisioner.go +++ b/venonactl/pkg/plugins/volume-provisioner.go @@ -20,6 +20,7 @@ import ( "fmt" "github.com/codefresh-io/venona/venonactl/pkg/logger" + "github.com/codefresh-io/venona/venonactl/pkg/obj/kubeobj" templates "github.com/codefresh-io/venona/venonactl/pkg/templates/kubernetes" ) @@ -86,6 +87,24 @@ func (u *volumeProvisionerPlugin) Delete(deleteOpt *DeleteOptions, v Values) err return delete(opt) } -func (u *volumeProvisionerPlugin) Upgrade(_ *UpgradeOptions, v Values) (Values, error) { +func (u *volumeProvisionerPlugin) Upgrade(opt *UpgradeOptions, v Values) (Values, error) { + var err error + kubeClientset, err := opt.KubeBuilder.BuildClient() + if err != nil { + u.logger.Error(fmt.Sprintf("Cannot create kubernetes clientset: %v ", err)) + return nil, err + } + kubeObjects, err := getKubeObjectsFromTempalte(v, volumeProvisionerFilesPattern, u.logger) + if err != nil { + return nil, err + } + for _, local := range kubeObjects { + + _, _, err := kubeobj.ReplaceObject(kubeClientset, local, opt.ClusterNamespace) + if err != nil { + return nil, err + } + } return v, nil + } diff --git a/venonactl/pkg/store/store.go b/venonactl/pkg/store/store.go index e5adf23e..34bf2df9 100644 --- a/venonactl/pkg/store/store.go +++ b/venonactl/pkg/store/store.go @@ -95,7 +95,7 @@ func (s *Values) BuildValues() map[string]interface{} { }, "VolumeProvisionerImage": map[string]string{ "Name": "codefresh/dind-volume-provisioner", - "Tag": "v13", + "Tag": "v17", }, "Namespace": s.KubernetesAPI.Namespace, "NodeSelector": s.KubernetesAPI.NodeSelector,