wait longer for service update

This commit is contained in:
Felix Kunde
2020-02-13 12:11:36 +01:00
parent 64b5cd1e95
commit d3cf93b5cf
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -395,7 +395,8 @@ func (c *Cluster) updateService(role PostgresRole, newService *v1.Service) error
}
}
// when disabling LoadBalancers patch does not work because of LoadBalancerSourceRanges field (even if nil)
// now, patch the service spec, but when disabling LoadBalancers do update instead
// patch does not work because of LoadBalancerSourceRanges field (even if set to nil)
oldServiceType := c.Services[role].Spec.Type
newServiceType := newService.Spec.Type
if newServiceType == "ClusterIP" && newServiceType != oldServiceType {
@@ -411,7 +412,6 @@ func (c *Cluster) updateService(role PostgresRole, newService *v1.Service) error
return fmt.Errorf("could not form patch for the service %q: %v", serviceName, err)
}
// update the service spec
svc, err = c.KubeClient.Services(serviceName.Namespace).Patch(
serviceName.Name,
types.MergePatchType,