diff --git a/modules/common/route/route.go b/modules/common/route/route.go index d9d19e44..07b9579d 100644 --- a/modules/common/route/route.go +++ b/modules/common/route/route.go @@ -189,3 +189,20 @@ func (r *Route) Delete( return nil } + +// AddAnnotation - Adds annotation and merges it with the current set +func (r *Route) addAnnotation(anno map[string]string) { + if r.EmbeddedLabelsAnnotations == nil { + r.EmbeddedLabelsAnnotations = &EmbededLabelsAnnotations{} + } + r.Annotations = util.MergeMaps(r.Annotations, anno) +} + + +// AddLabel - Adds annotation and merges it with the current set +func (r *Route) addLabel(label map[string]string) { + if r.EmbeddedLabelsAnnotations == nil { + r.EmbeddedLabelsAnnotations = &EmbededLabelsAnnotations{} + } + r.Labels = util.MergeMaps(r.Labels, label) +}