Skip to content

Commit

Permalink
Merge pull request #1205 from shipt/bugfix-contour-annotation-override
Browse files Browse the repository at this point in the history
fix contour httproxy annotations overwrite
  • Loading branch information
aryan9600 authored Jun 21, 2022
2 parents c31ef8a + 0cecab5 commit 7b2c005
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/router/contour.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down

0 comments on commit 7b2c005

Please sign in to comment.