diff --git a/pkg/router/contour.go b/pkg/router/contour.go index a8063178e..8e30acffb 100644 --- a/pkg/router/contour.go +++ b/pkg/router/contour.go @@ -188,10 +188,10 @@ func (cr *ContourRouter) Reconcile(canary *flaggerv1.Canary) error { } if cr.ingressClass != "" { - if proxy.Annotations == nil{ - proxy.Annotations = make(map[string]string) - } - proxy.Annotations[annotation] = cr.ingressClass + if proxy.Annotations == nil { + proxy.Annotations = make(map[string]string) + } + proxy.Annotations[annotation] = cr.ingressClass } _, err = cr.contourClient.ProjectcontourV1().HTTPProxies(canary.Namespace).Create(context.TODO(), proxy, metav1.CreateOptions{})