From 59959e6df5b10f6f28c2c121480ed94e5a6b5aaa Mon Sep 17 00:00:00 2001 From: brandoncate Date: Tue, 14 Jun 2022 12:28:40 -0500 Subject: [PATCH] fix contour httpproxy annotations overwritten if ingress class selected --- pkg/router/contour.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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{})