From 0cecab530f6f1aeefffda54e065978eedffa5801 Mon Sep 17 00:00:00 2001 From: brandoncate Date: Fri, 17 Jun 2022 10:02:02 -0500 Subject: [PATCH] fix contour httproxy annotations overwrite Signed-off-by: brandoncate --- pkg/router/contour.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/router/contour.go b/pkg/router/contour.go index dd39413f8..8e30acffb 100644 --- a/pkg/router/contour.go +++ b/pkg/router/contour.go @@ -188,9 +188,10 @@ func (cr *ContourRouter) Reconcile(canary *flaggerv1.Canary) error { } if cr.ingressClass != "" { - proxy.Annotations = map[string]string{ - 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{})