mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 19:21:55 +02:00
Do not delete replica service w/o load balancer during sync
This commit is contained in:
@@ -108,11 +108,6 @@ func (c *Cluster) syncService(role PostgresRole) error {
|
||||
|
||||
svc, err := c.KubeClient.Services(c.Namespace).Get(c.serviceName(role), metav1.GetOptions{})
|
||||
if err == nil {
|
||||
if role == Replica && !c.Spec.ReplicaLoadBalancer {
|
||||
if err := c.deleteService(role); err != nil {
|
||||
return fmt.Errorf("could not delete %s service", role)
|
||||
}
|
||||
}
|
||||
|
||||
desiredSvc := c.generateService(role, &c.Spec)
|
||||
match, reason := k8sutil.SameService(svc, desiredSvc)
|
||||
|
||||
Reference in New Issue
Block a user