Merge pull request #282 from zalando-incubator/assign_existing_service_definition_during_sync

Fix a bug with syncing services
This commit is contained in:
Oleksii Kliukin
2018-04-27 13:49:40 +02:00
committed by GitHub
+1 -2
View File
@@ -108,11 +108,10 @@ func (c *Cluster) syncService(role PostgresRole) error {
svc, err := c.KubeClient.Services(c.Namespace).Get(c.serviceName(role), metav1.GetOptions{})
if err == nil {
c.Services[role] = svc
desiredSvc := c.generateService(role, &c.Spec)
match, reason := k8sutil.SameService(svc, desiredSvc)
if match {
c.Services[role] = svc
return nil
}
c.logServiceChanges(role, svc, desiredSvc, false, reason)