Skip to content

Commit 8f9c974

Browse files
author
Peng Zhou
committed
Fix Unit Test Failuer
1 parent f76cc4a commit 8f9c974

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/k8sutil/statefulset.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ type containerParameters struct {
6565
func (oc *OperatorContext) ReconcileStatefulset() (reconcile.Result, error) {
6666
cr := oc.GetMarkLogicServer()
6767
logger := oc.ReqLogger
68-
// labels := getCommonLabels()
69-
groupLabels := cr.GetLabels()
68+
groupLabels := cr.Labels
69+
if groupLabels == nil {
70+
groupLabels = getSelectorLabels(cr.Spec.Name)
71+
}
7072
groupLabels["app.kubernetes.io/instance"] = cr.Spec.Name
7173
groupAnnotations := cr.GetAnnotations()
7274
delete(groupAnnotations, "banzaicloud.com/last-applied")

0 commit comments

Comments
 (0)