@@ -156,7 +156,7 @@ func (n *NutanixCSI) handleHelmAddonApply(
156
156
return fmt .Errorf ("failed to get helm chart %q: %w" , config .NutanixStorageCSI , err )
157
157
}
158
158
159
- snapshotHelmChart , err := n .helmChartInfoGetter .For (ctx , log , config .NutanixSnapshotCSI )
159
+ snapshotChart , err := n .helmChartInfoGetter .For (ctx , log , config .NutanixSnapshotCSI )
160
160
if err != nil {
161
161
return fmt .Errorf ("failed to get helm chart %q: %w" , config .NutanixSnapshotCSI , err )
162
162
}
@@ -193,21 +193,25 @@ func (n *NutanixCSI) handleHelmAddonApply(
193
193
Name : "nutanix-csi-snapshot-" + req .Cluster .Name ,
194
194
},
195
195
Spec : caaphv1.HelmChartProxySpec {
196
- RepoURL : snapshotHelmChart .Repository ,
197
- ChartName : snapshotHelmChart .Name ,
196
+ RepoURL : snapshotChart .Repository ,
197
+ ChartName : snapshotChart .Name ,
198
198
ClusterSelector : metav1.LabelSelector {
199
199
MatchLabels : map [string ]string {clusterv1 .ClusterNameLabel : req .Cluster .Name },
200
200
},
201
201
ReleaseNamespace : defaultSnapshotHelmReleaseNamespace ,
202
202
ReleaseName : defaultSnapshotHelmReleaseName ,
203
- Version : snapshotHelmChart .Version ,
203
+ Version : snapshotChart .Version ,
204
204
},
205
205
}
206
206
207
207
// We use a slice of pointers to satisfy the gocritic linter rangeValCopy check.
208
208
for _ , cp := range []* caaphv1.HelmChartProxy {storageChartProxy , snapshotChartProxy } {
209
209
if err = controllerutil .SetOwnerReference (& req .Cluster , cp , n .client .Scheme ()); err != nil {
210
- return fmt .Errorf ("failed to set owner reference on HelmChartProxy %q: %w" , cp .Name , err )
210
+ return fmt .Errorf (
211
+ "failed to set owner reference on HelmChartProxy %q: %w" ,
212
+ cp .Name ,
213
+ err ,
214
+ )
211
215
}
212
216
213
217
if err = client .ServerSideApply (ctx , n .client , cp , client .ForceOwnership ); err != nil {
0 commit comments