Skip to content

Commit

Permalink
fix(trafficrouting): add nil check for desired annotations map in ALB…
Browse files Browse the repository at this point in the history
… ingress

Signed-off-by: Youssef Rabie <[email protected]>
  • Loading branch information
y-rabie committed Sep 26, 2024
1 parent ff93786 commit 1884643
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rollout/trafficrouting/alb/alb.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ func getDesiredAnnotations(current *ingressutil.Ingress, r *v1alpha1.Rollout, po
if err != nil {
return nil, err
}
if desired == nil {
desired = make(map[string]string)

Check warning on line 413 in rollout/trafficrouting/alb/alb.go

View check run for this annotation

Codecov / codecov/patch

rollout/trafficrouting/alb/alb.go#L413

Added line #L413 was not covered by tests
}
desired[key] = value
return modifyManagedAnnotation(desired, r.Name, true, key)
}
Expand Down

0 comments on commit 1884643

Please sign in to comment.