Skip to content

Commit 077f30e

Browse files
authored
fixed status update issue in case of non sc managed tconf
1 parent d0ae29b commit 077f30e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

operator/controllers/configurator/storage_drivers/yaml_factory.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ func getFsxnTBCYaml(svm SVM, tridentNamespace, backendName, protocolType, tconfN
213213
tbcYaml = strings.ReplaceAll(tbcYaml, "{SVM_NAME}", svm.SvmName)
214214
tbcYaml = strings.ReplaceAll(tbcYaml, "{AWS_ARN}", svm.SecretARNName)
215215
tbcYaml = strings.ReplaceAll(tbcYaml, "{DRIVER_TYPE}", storageDriverName)
216+
labels := fmt.Sprintf("labels:\n trident.netapp.io/configurator: %s\n", tconfName)
217+
tbcYaml = strings.ReplaceAll(tbcYaml, "{LABELS}", labels)
216218

217219
if scManagedTconf {
218-
labels := fmt.Sprintf("labels:\n trident.netapp.io/configurator: %s\n", tconfName)
219-
tbcYaml = strings.ReplaceAll(tbcYaml, "{LABELS}", labels)
220220

221221
tbcYaml = replaceBoolIfPresent(tbcYaml, "{USE_REST}", tconfSpec, "useREST")
222222
tbcYaml = replaceBoolIfPresent(tbcYaml, "{AUTO_EXPORT_POLICY}", tconfSpec, "autoExportPolicy")
@@ -242,7 +242,6 @@ func getFsxnTBCYaml(svm SVM, tridentNamespace, backendName, protocolType, tconfN
242242

243243
tbcYaml = replaceDefaultsSection(tbcYaml, tconfSpec)
244244
} else {
245-
tbcYaml = strings.ReplaceAll(tbcYaml, "{LABELS}", "")
246245
tbcYaml = setEmptyOptionalFields(tbcYaml)
247246
}
248247

0 commit comments

Comments
 (0)