Skip to content

Commit 475a472

Browse files
author
Peng Zhou
committed
Fix test issue
1 parent c13a6e3 commit 475a472

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/k8sutil/statefulset.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,16 @@ func generateContainerParams(cr *marklogicv1.MarklogicGroup) containerParameters
402402
Tls: cr.Spec.Tls,
403403
AdditionalVolumes: cr.Spec.AdditionalVolumes,
404404
AdditionalVolumeMounts: cr.Spec.AdditionalVolumeMounts,
405-
SecretName: cr.Spec.SecretName,
406405
Persistence: cr.Spec.Persistence,
407406
}
408407

408+
// Set SecretName with fallback to default if not specified
409+
if cr.Spec.SecretName != "" {
410+
containerParams.SecretName = cr.Spec.SecretName
411+
} else {
412+
containerParams.SecretName = cr.ObjectMeta.Name + "-admin"
413+
}
414+
409415
if cr.Spec.License != nil {
410416
containerParams.LicenseKey = cr.Spec.License.Key
411417
containerParams.Licensee = cr.Spec.License.Licensee

0 commit comments

Comments
 (0)