Skip to content

Commit

Permalink
[charts] add inbox conf to api
Browse files Browse the repository at this point in the history
  • Loading branch information
MalinAhlberg committed Nov 29, 2024
1 parent 7b2e090 commit f7f76e0
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions charts/sda-svc/templates/api-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,40 @@ spec:
value: {{ required "A valid DB host is required" .Values.global.db.host | quote }}
- name: DB_PORT
value: {{ .Values.global.db.port | quote }}
- name: INBOX_TYPE
{{- if eq "s3" .Values.global.inbox.storageType }}
value: "s3"
- name: INBOX_BUCKET
value: {{ required "S3 inbox bucket missing" .Values.global.inbox.s3Bucket }}
{{- if and .Values.global.inbox.s3CaFile .Values.global.tls.enabled }}
- name: INBOX_CACERT
value: {{ template "tlsPath" . }}/ca.crt
{{- end }}
- name: INBOX_REGION
value: {{ default "us-east-1" .Values.global.inbox.s3Region }}
- name: INBOX_URL
value: {{ required "S3 inbox URL missing" .Values.global.inbox.s3Url }}
{{- if .Values.global.inbox.s3Port }}
- name: INBOX_PORT
value: {{ .Values.global.inbox.s3Port | quote }}
{{- end }}
{{- else }}
value: "posix"
- name: INBOX_LOCATION
value: "{{ .Values.global.inbox.path }}/"
{{- end }}
{{- if eq "s3" .Values.global.inbox.storageType }}
- name: INBOX_ACCESSKEY
valueFrom:
secretKeyRef:
name: {{ template "sda.fullname" . }}-s3inbox-keys
key: s3InboxAccessKey
- name: INBOX_SECRETKEY
valueFrom:
secretKeyRef:
name: {{ template "sda.fullname" . }}-s3inbox-keys
key: s3InboxSecretKey
{{- end }}
{{- if .Values.global.log.format }}
- name: LOG_FORMAT
value: {{ .Values.global.log.format | quote }}
Expand Down Expand Up @@ -204,6 +238,10 @@ spec:
{{- if .Values.global.tls.enabled }}
- name: tls
mountPath: {{ template "tlsPath" . }}
{{- end }}
{{- if eq "posix" .Values.global.inbox.storageType }}
- name: inbox
mountPath: {{ .Values.global.inbox.path | quote }}
{{- end }}
volumes:
{{- if not .Values.global.vaultSecrets }}
Expand Down Expand Up @@ -238,4 +276,15 @@ spec:
secretName: {{ required "An certificate issuer or a TLS secret name is required for api" .Values.api.tls.secretName }}
{{- end }}
{{- end }}
{{- if eq "posix" .Values.global.inbox.storageType }}
- name: inbox
{{- if .Values.global.inbox.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.global.inbox.existingClaim }}
{{- else }}
nfs:
server: {{ required "An inbox NFS server is required" .Values.global.inbox.nfsServer | quote }}
path: {{ if .Values.global.inbox.nfsPath }}{{ .Values.global.inbox.nfsPath | quote }}{{ else }}{{ "/" }}{{ end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit f7f76e0

Please sign in to comment.