Skip to content

Commit f15942a

Browse files
author
Peng Zhou
committed
Fix Unit Test Failuer
1 parent ae0d098 commit f15942a

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
@@ -64,8 +64,10 @@ type containerParameters struct {
6464
func (oc *OperatorContext) ReconcileStatefulset() (reconcile.Result, error) {
6565
cr := oc.GetMarkLogicServer()
6666
logger := oc.ReqLogger
67-
// labels := getCommonLabels()
68-
groupLabels := cr.GetLabels()
67+
groupLabels := cr.Labels
68+
if groupLabels == nil {
69+
groupLabels = getSelectorLabels(cr.Spec.Name)
70+
}
6971
groupLabels["app.kubernetes.io/instance"] = cr.Spec.Name
7072
groupAnnotations := cr.GetAnnotations()
7173
delete(groupAnnotations, "banzaicloud.com/last-applied")

0 commit comments

Comments
 (0)