Skip to content

Commit

Permalink
fix contour httpproxy annotations overwritten if ingress class selected
Browse files Browse the repository at this point in the history
Signed-off-by: brandoncate <brandon.cate@shipt.com>
  • Loading branch information
BrandonCate committed Jun 14, 2022
1 parent 5a5261a commit 0c57db4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/router/contour.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down

0 comments on commit 0c57db4

Please sign in to comment.