Skip to content

Commit 755be9b

Browse files
committed
MAJOR: kubernetes-ingress: AWS Marketplace support (#107)
Adding AWS Marketplace integration code from Dario Tranchitella Signed-off-by: Dinko Korunic <[email protected]>
1 parent e9f6877 commit 755be9b

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

kubernetes-ingress/templates/controller-deployment.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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 }}

kubernetes-ingress/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ serviceAccount:
4040
create: true
4141
name:
4242

43+
## AWS Market Place integration
44+
## Allows installation of the HAPEE Ingress Controller on AWS EKS and EKS-Anywhere.
45+
## ref: https://docs.aws.amazon.com/marketplace/latest/userguide/container-anywhere-license-manager-integration.html
46+
aws:
47+
## Name of the Secret deployed in the desired namespace containing the AWS license files
48+
licenseConfigSecretName: ""
4349

4450
## Controller default values
4551
controller:

0 commit comments

Comments
 (0)