Skip to content

Commit

Permalink
Fix nil annotations 1.3 (#603) (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatekus authored Jan 18, 2024
1 parent 94142c1 commit 0e258c9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ func buildStateFnUpdateService(newService corev1.Service) stateFn {
svc.Spec.Type = newService.Spec.Type

svc.ObjectMeta.Labels = newService.GetLabels()
if svc.ObjectMeta.Annotations == nil {
svc.ObjectMeta.Annotations = make(map[string]string)
}
mergeMapWithNewValues(svc.ObjectMeta.Annotations, newService.GetAnnotations())

r.log.Info(fmt.Sprintf("Updating Service %s", svc.GetName()))
Expand Down

0 comments on commit 0e258c9

Please sign in to comment.