k8sutil: ignore alreadyExist on createService
@@ -146,8 +146,11 @@ func createService(kubecli kubernetes.Interface, svcName, clusterName, ns, clust
svc := newEtcdServiceManifest(svcName, clusterName, clusterIP, ports)
addOwnerRefToObject(svc.GetObjectMeta(), owner)
_, err := kubecli.CoreV1().Services(ns).Create(svc)
+ if err != nil && !apierrors.IsAlreadyExists(err) {
return err
}
+ return nil
+}
// CreateAndWaitPod is a workaround for self hosted and util for testing.
// We should eventually get rid of this in critical code path and move it to test util.
