Skip to content

Commit b84275c

Browse files
authored
fixed status update issue in case of non sc managed tconf
1 parent 6633723 commit b84275c

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

operator/controllers/configurator/storage_drivers/yaml_factory.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +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)
220-
221220
tbcYaml = replaceBoolIfPresent(tbcYaml, "{USE_REST}", tconfSpec, "useREST")
222221
tbcYaml = replaceBoolIfPresent(tbcYaml, "{AUTO_EXPORT_POLICY}", tconfSpec, "autoExportPolicy")
223222

@@ -242,7 +241,6 @@ func getFsxnTBCYaml(svm SVM, tridentNamespace, backendName, protocolType, tconfN
242241

243242
tbcYaml = replaceDefaultsSection(tbcYaml, tconfSpec)
244243
} else {
245-
tbcYaml = strings.ReplaceAll(tbcYaml, "{LABELS}", "")
246244
tbcYaml = setEmptyOptionalFields(tbcYaml)
247245
}
248246

0 commit comments

Comments
 (0)