Skip to content

Commit

Permalink
Add ability to pass CLUSTER_NAME env variable in helm chart (#436)
Browse files Browse the repository at this point in the history
* Add ability to pass CLUSTER_NAME env variable for helm chart

* address PR comments

---------

Co-authored-by: Zijun Wang <[email protected]>
  • Loading branch information
zijun726911 and Zijun Wang authored Oct 16, 2023
1 parent c3d0ab9 commit f68c970
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 f68c970

Please sign in to comment.