add ServiceName to statefulset
@@ -740,13 +740,9 @@ func (r *ComponentReconcilerTask) ReconcileStatefulSet(
MatchLabels: labelMap,
},
VolumeClaimTemplates: volClaimTemplates,
- ServiceName: r.component.Name,
+ ServiceName: r.headlessService.Name,
},
}
-
- if r.component.Spec.EnableHeadlessService && r.headlessService != nil {
- sts.Spec.ServiceName = r.headlessService.Name
- }
} else {
// for sts, only 'replicas', 'template', and 'updateStrategy' are mutable
// so no update for volClaimTemplate here
