Do not delete an endpoint for the replica service w/o load balancer during sync

This commit is contained in:
Sergey Dudoladov 2018-02-27 17:18:30 +01:00
parent b107d781e8
commit 28fed26845
1 changed files with 0 additions and 5 deletions

View File

@ -160,11 +160,6 @@ func (c *Cluster) syncEndpoint(role PostgresRole) error {
ep, err := c.KubeClient.Endpoints(c.Namespace).Get(c.endpointName(role), metav1.GetOptions{})
if err == nil {
if role == Replica && !c.Spec.ReplicaLoadBalancer {
if err := c.deleteEndpoint(role); err != nil {
return fmt.Errorf("could not delete %s endpoint", role)
}
}
c.Endpoints[role] = ep
return nil