Skip to content

Commit

Permalink
Add ability to pass CLUSTER_NAME env variable for helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Zijun Wang committed Oct 13, 2023
1 parent 24cedb3 commit 84cb520
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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= \
```
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ data:
awsRegion: {{ .Values.awsRegion | quote }}
awsAccountId: {{ .Values.awsAccountId | quote }}
clusterVpcId: {{ .Values.clusterVpcId | quote }}
clusterName: {{ .Values.clusterName | quote }}

5 changes: 5 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ serviceAccount:
awsRegion:
awsAccountId:
clusterVpcId:
clusterName:

0 comments on commit 84cb520

Please sign in to comment.