From 84cb52074b064197c1ca55d476d11cdb92a20798 Mon Sep 17 00:00:00 2001 From: Zijun Wang Date: Fri, 13 Oct 2023 15:32:13 -0700 Subject: [PATCH] Add ability to pass CLUSTER_NAME env variable for helm chart --- docs/deploy.md | 3 ++- helm/templates/configmap.yaml | 2 ++ helm/templates/deployment.yaml | 5 +++++ helm/values.yaml | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/deploy.md b/docs/deploy.md index c87e3bcf..5acf228a 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -81,9 +81,10 @@ Run through them again for a second cluster to use with the extended example sho oci://public.ecr.aws/aws-application-networking-k8s/aws-gateway-controller-chart\ --version=v0.0.17 \ --set=serviceAccount.create=false --namespace aws-application-networking-system \ - # Region, clusterVpcId, awsAccountId are required for case where IMDS is NOT AVAILABLE, e.g Fargate + # awsRegion, clusterVpcId,clusterName, awsAccountId are required for case where IMDS is NOT AVAILABLE, e.g Fargate, self-managed clusters with IMDS access blocked --set=awsRegion= \ --set=clusterVpcId= \ + --set=clusterName= \ --set=awsAccountId= \ ``` diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 1550d661..c4145074 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -6,3 +6,5 @@ data: awsRegion: {{ .Values.awsRegion | quote }} awsAccountId: {{ .Values.awsAccountId | quote }} clusterVpcId: {{ .Values.clusterVpcId | quote }} + clusterName: {{ .Values.clusterName | quote }} + diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 505dd4a3..3926a62b 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -82,6 +82,11 @@ spec: configMapKeyRef: name: env-config key: clusterVpcId + - name: CLUSTER_NAME + valueFrom: + configMapKeyRef: + name: env-config + key: clusterName terminationGracePeriodSeconds: 10 nodeSelector: {{ toYaml .Values.deployment.nodeSelector | nindent 8 }} diff --git a/helm/values.yaml b/helm/values.yaml index 1280aac4..75c78d80 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -74,3 +74,4 @@ serviceAccount: awsRegion: awsAccountId: clusterVpcId: +clusterName: