Merge pull request #282 from zalando-incubator/assign_existing_service_definition_during_sync
Fix a bug with syncing services
This commit is contained in:
		
						commit
						4a3ccad362
					
				|  | @ -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) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue