Check for item existance
@@ -126,7 +126,9 @@ func (r *ReconcilePerconaXtraDBCluster) updateService(svc *corev1.Service, podSp
return fmt.Errorf("failed to get sate: %v", err)
}
+ if podSpec.ServiceType != nil {
currentService.Spec.Type = *podSpec.ServiceType
+ }
return r.client.Update(context.TODO(), currentService)
}
