From cc8b100331d8ae34bf861aa4ab24acafc3b8516a Mon Sep 17 00:00:00 2001 From: Ilia Zlobin Date: Wed, 18 Dec 2019 17:04:43 +0300 Subject: [PATCH] Handle variables in annotations --- api/konfig/builtinpluginconsts/varreference.go | 2 ++ api/krusty/variableref_test.go | 4 ++++ 2 files changed, 6 insertions(+) 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