Skip to content

Commit 615eac3

Browse files
authored
[helm chart] Allow passing template values for clusterName, region and vpcId (#3664)
* [helm chart] Allow passing template values for clusterName, region and vpcId * Update Chart.yaml
1 parent 5df1ab7 commit 615eac3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

helm/aws-load-balancer-controller/templates/deployment.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,17 @@ spec:
6262
containers:
6363
- name: {{ .Chart.Name }}
6464
args:
65-
- --cluster-name={{ required "Chart cannot be installed without a valid clusterName!" .Values.clusterName }}
65+
- --cluster-name={{ required "Chart cannot be installed without a valid clusterName!" (tpl (default "" .Values.clusterName) .) }}
6666
{{- if .Values.ingressClass }}
6767
- --ingress-class={{ .Values.ingressClass }}
6868
{{- end }}
69-
{{- if .Values.region }}
69+
{{- $region := tpl (default "" .Values.region) . }}
70+
{{- if $region }}
7071
- --aws-region={{ .Values.region }}
7172
{{- end }}
72-
{{- if .Values.vpcId }}
73-
- --aws-vpc-id={{ .Values.vpcId }}
73+
{{- $vpcID := tpl (default "" .Values.vpcId) . }}
74+
{{- if $vpcID }}
75+
- --aws-vpc-id={{ $vpcID }}
7476
{{- end }}
7577
{{- if .Values.awsApiEndpoints }}
7678
- --aws-api-endpoints={{ .Values.awsApiEndpoints }}

0 commit comments

Comments
 (0)