Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions chart/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ spec:
value: worker
- name: OPS_CONTAINER_TYPE
value: WORKER
{{- if .Values.worker.awsWebIdentity.enabled }}
- name: OPS_AWS_WEB_IDENTITY_TOKEN_FILE
value: {{ printf "%s/token" (trimSuffix "/" .Values.worker.awsWebIdentity.mountPath) | quote }}
{{- end }}
{{ include "openops.renderEnv" (dict "root" . "env" .Values.openopsEnv "skipDuplicateSecrets" true) | nindent 12 }}
{{ include "openops.renderEnv" (dict "root" . "env" .Values.openopsEnvSecrets) | nindent 12 }}
{{ include "openops.renderEnv" (dict "root" . "env" .Values.worker.env) | nindent 12 }}
Expand All @@ -71,8 +75,22 @@ spec:
mountPath: /tmp/.npm
- name: tmp-codes
mountPath: /tmp/codes
{{- if .Values.worker.awsWebIdentity.enabled }}
- name: aws-web-identity-token
mountPath: {{ .Values.worker.awsWebIdentity.mountPath }}
readOnly: true
{{- end }}
volumes:
- name: npm-cache
emptyDir: {}
- name: tmp-codes
emptyDir: {}
{{- if .Values.worker.awsWebIdentity.enabled }}
- name: aws-web-identity-token
projected:
sources:
- serviceAccountToken:
path: token
audience: {{ .Values.worker.awsWebIdentity.audience | quote }}
expirationSeconds: {{ .Values.worker.awsWebIdentity.expirationSeconds }}
{{- end }}
10 changes: 10 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,16 @@ worker:
create: true
name: ""
annotations: {}
# Exchange a projected service account token for AWS credentials, the way IRSA
# does on EKS. Enabling this projects the token and sets
# OPS_AWS_WEB_IDENTITY_TOKEN_FILE to match; you supply the role it federates
# into as OPS_AWS_FEDERATION_ROLE_ARN in openopsEnv.
# Leave disabled on EKS: IRSA injects its own token and the AWS SDK finds it.
awsWebIdentity:
enabled: false
audience: sts.amazonaws.com
expirationSeconds: 3600
mountPath: /var/run/secrets/aws
# Prometheus metrics
metrics:
enabled: true
Expand Down
Loading