From 45366d39831f56cd615a7167549d4c6ae4c500dd Mon Sep 17 00:00:00 2001 From: Dimitri Koshkin Date: Tue, 9 Apr 2024 14:41:58 -0700 Subject: [PATCH] fix: Nutanix CSI HelmChartProxy name and namespace --- .../generic/lifecycle/csi/nutanix-csi/handler.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/handlers/generic/lifecycle/csi/nutanix-csi/handler.go b/pkg/handlers/generic/lifecycle/csi/nutanix-csi/handler.go index 6042e3f78..f695eeae8 100644 --- a/pkg/handlers/generic/lifecycle/csi/nutanix-csi/handler.go +++ b/pkg/handlers/generic/lifecycle/csi/nutanix-csi/handler.go @@ -25,11 +25,11 @@ import ( ) const ( - defaultStorageHelmReleaseNameTemplate = "nutanix-csi-storage-%s" - defaultStorageHelmReleaseNamespace = "ntnx-system" + defaultStorageHelmReleaseName = "nutanix-csi-storage" + defaultStorageHelmReleaseNamespace = "ntnx-system" - defaultSnapshotHelmReleaseNameTemplate = "nutanix-csi-snapshot-%s" - defaultSnapshotHelmReleaseNamespace = "ntnx-system" + defaultSnapshotHelmReleaseName = "nutanix-csi-snapshot" + defaultSnapshotHelmReleaseNamespace = "ntnx-system" //nolint:gosec // Does not contain hard coded credentials. defaultCredentialsSecretName = "nutanix-csi-credentials" @@ -168,8 +168,8 @@ func (n *NutanixCSI) handleHelmAddonApply( ClusterSelector: metav1.LabelSelector{ MatchLabels: map[string]string{clusterv1.ClusterNameLabel: req.Cluster.Name}, }, - ReleaseNamespace: req.Cluster.Namespace, - ReleaseName: fmt.Sprintf(defaultStorageHelmReleaseNameTemplate, req.Cluster.Name), + ReleaseNamespace: defaultStorageHelmReleaseNamespace, + ReleaseName: defaultStorageHelmReleaseName, Version: helmChart.Version, ValuesTemplate: values, }, @@ -206,8 +206,8 @@ func (n *NutanixCSI) handleHelmAddonApply( ClusterSelector: metav1.LabelSelector{ MatchLabels: map[string]string{clusterv1.ClusterNameLabel: req.Cluster.Name}, }, - ReleaseNamespace: req.Cluster.Namespace, - ReleaseName: fmt.Sprintf(defaultSnapshotHelmReleaseNameTemplate, req.Cluster.Name), + ReleaseNamespace: defaultSnapshotHelmReleaseNamespace, + ReleaseName: defaultSnapshotHelmReleaseName, Version: snapshotHelmChart.Version, }, }