log canary.spec.service for debugging purposes

This commit is contained in:
Finn Herzfeld
2020-04-04 16:48:35 +03:00
committed by stefanprodan
parent 5c48430ed2
commit 0aee385145
+3
View File
@@ -125,6 +125,9 @@ func (c *KubernetesDefaultRouter) reconcileService(canary *flaggerv1.Canary, nam
metadata.Annotations[k] = v
}
c.logger.With("canary", fmt.Sprintf("%s.%s", canary.Name, canary.Namespace)).
Debugw(fmt.Sprintf("Creating Service %s", name), "metadata", metadata, "service_configuration", canary.Spec.Service)
// create service if it doesn't exists
svc, err := c.kubeClient.CoreV1().Services(canary.Namespace).Get(context.TODO(), name, metav1.GetOptions{})
if errors.IsNotFound(err) {