From e454637dad76f7c24dad0071484dc21df8bfed4c Mon Sep 17 00:00:00 2001 From: Tiago Posse Date: Tue, 17 Dec 2024 11:58:04 +0100 Subject: [PATCH] feat(amazon-eks-pod-identity-webhook): allow a set of configuration fields to be templated --- .../templates/configmap.yaml | 2 +- .../templates/deployment.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/amazon-eks-pod-identity-webhook/templates/configmap.yaml b/charts/amazon-eks-pod-identity-webhook/templates/configmap.yaml index 34637d1..a0c6949 100644 --- a/charts/amazon-eks-pod-identity-webhook/templates/configmap.yaml +++ b/charts/amazon-eks-pod-identity-webhook/templates/configmap.yaml @@ -7,5 +7,5 @@ metadata: labels: {{- include "amazon-eks-pod-identity-webhook.labels" . | nindent 4 }} data: - config: {{ .Values.config.podIdentityWebhookMap.data | toJson | quote }} + config: {{ .Values.config.podIdentityWebhookMap.data | toJson | tpl . | quote }} {{- end }} diff --git a/charts/amazon-eks-pod-identity-webhook/templates/deployment.yaml b/charts/amazon-eks-pod-identity-webhook/templates/deployment.yaml index 36aed72..feaac58 100644 --- a/charts/amazon-eks-pod-identity-webhook/templates/deployment.yaml +++ b/charts/amazon-eks-pod-identity-webhook/templates/deployment.yaml @@ -42,15 +42,15 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} command: - /webhook - - --annotation-prefix={{ .Values.config.annotationPrefix }} - - --aws-default-region={{ .Values.config.defaultAwsRegion }} + - --annotation-prefix={{ tpl .Values.config.annotationPrefix . }} + - --aws-default-region={{ tpl .Values.config.defaultAwsRegion . }} - --in-cluster=false - --logtostderr - --namespace={{ include "amazon-eks-pod-identity-webhook.namespace" . }} - --metrics-port={{ .Values.config.ports.metrics }} - --port={{ .Values.config.ports.webhook }} - - --sts-regional-endpoint={{ .Values.config.stsRegionalEndpoint }} - - --token-audience={{ .Values.config.tokenAudience }} + - --sts-regional-endpoint={{ tpl .Values.config.stsRegionalEndpoint . }} + - --token-audience={{ tpl .Values.config.tokenAudience . }} - --token-expiration={{ .Values.config.tokenExpiration }} - --token-mount-path={{ .Values.config.tokenMountPath }} - --tls-cert=/etc/webhook/certs/tls.crt