diff --git a/api/konfig/builtinpluginconsts/varreference.go b/api/konfig/builtinpluginconsts/varreference.go index 823745716..dbf2b45be 100644 --- a/api/konfig/builtinpluginconsts/varreference.go +++ b/api/konfig/builtinpluginconsts/varreference.go @@ -190,5 +190,7 @@ varReference: kind: StatefulSet - path: metadata/labels + +- path: metadata/annotations ` ) diff --git a/api/krusty/variableref_test.go b/api/krusty/variableref_test.go index 8ca85f9fc..37b9bf082 100644 --- a/api/krusty/variableref_test.go +++ b/api/krusty/variableref_test.go @@ -1157,6 +1157,8 @@ vars: name: my-deployment labels: my-label: $(NAMESPACE) + annotations: + my-annotation: $(NAMESPACE) spec: template: spec: @@ -1176,6 +1178,8 @@ vars: apiVersion: apps/v1 kind: Deployment metadata: + annotations: + my-annotation: my-namespace labels: my-label: my-namespace name: my-deployment