@@ -146,6 +146,15 @@ spec:
146146 {{- toYaml . | trim | nindent 12 }}
147147 {{- end }}
148148 env :
149+ {{- if .Values.aws.licenseConfigSecretName }}
150+ - name : AWS_WEB_IDENTITY_REFRESH_TOKEN_FILE
151+ value : " /var/run/secrets/product-license/license_token"
152+ - name : AWS_ROLE_ARN
153+ valueFrom :
154+ secretKeyRef :
155+ name : {{ .Values.aws.licenseConfigSecretName }}
156+ key : iam_role
157+ {{- end }}
149158 - name : POD_NAME
150159 valueFrom :
151160 fieldRef :
@@ -171,8 +180,13 @@ spec:
171180{{ toYaml .Values.controller.lifecycle | indent 12 }}
172181 {{- end }}
173182 {{- end }}
174- {{- if .Values.controller.extraVolumeMounts }}
183+ {{- if or .Values.controller.extraVolumeMounts .Values.aws.licenseConfigSecretName }}
175184 volumeMounts :
185+ {{- if .Values.aws.licenseConfigSecretName }}
186+ - name : aws-product-license
187+ readOnly : true
188+ mountPath : /var/run/secrets/product-license
189+ {{- end }}
176190 {{- if eq "string" (printf "%T" .Values.controller.extraVolumeMounts) }}
177191{{ tpl .Values.controller.extraVolumeMounts . | indent 12 }}
178192 {{- else }}
@@ -186,8 +200,14 @@ spec:
186200{{ toYaml .Values.controller.extraContainers | indent 8 }}
187201 {{- end }}
188202 {{- end }}
189- {{- if .Values.controller.extraVolumes }}
203+ {{- if or .Values.controller.extraVolumes .Values.aws.licenseConfigSecretName }}
190204 volumes :
205+ {{- if .Values.aws.licenseConfigSecretName }}
206+ - name : aws-product-license
207+ secret :
208+ secretName : {{ .Values.aws.licenseConfigSecretName }}
209+ optional : true
210+ {{- end }}
191211 {{- if eq "string" (printf "%T" .Values.controller.extraVolumes) }}
192212{{ tpl .Values.controller.extraVolumes . | indent 8 }}
193213 {{- else }}
0 commit comments