diff --git a/kustomize/commands/edit/add/addmetadata.go b/kustomize/commands/edit/add/addmetadata.go index 25b1a5aac..71f1d96e1 100644 --- a/kustomize/commands/edit/add/addmetadata.go +++ b/kustomize/commands/edit/add/addmetadata.go @@ -183,7 +183,7 @@ func (o *addMetadataOptions) writeToLabels(m *types.Kustomization, kind kindOfAd } continue } - if err := o.writeToMap(lbl.Pairs, kind); err != nil { + if err := o.writeToMapEntry(lbl.Pairs, k, v, kind); err != nil { return err } m.Labels = append(m.Labels, lbl)