Skip to content

Commit

Permalink
[charts][sda-svc] fix s3inbox ENVs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Sep 18, 2023
1 parent 4344b5f commit 2b87991
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
8 changes: 0 additions & 8 deletions charts/sda-svc/templates/_helpers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,6 @@ Create chart name and version as used by the chart label.
{{- end -}}
{{- end -}}

{{- define "S3InboxURL" -}}
{{- if .Values.global.inbox.s3Port }}
{{- printf "%s:%v" .Values.global.inbox.s3Url .Values.global.inbox.s3Port }}
{{- else }}
{{- printf "%s" .Values.global.inbox.s3Url }}
{{- end }}
{{- end -}}

{{- define "S3ArchiveURL" -}}
{{- if .Values.global.inbox.s3Port }}
{{- printf "%s:%v" .Values.global.inbox.s3Url .Values.global.inbox.s3Port }}
Expand Down
20 changes: 12 additions & 8 deletions charts/sda-svc/templates/s3-inbox-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ spec:
{{- end }}
env:
{{- if not .Values.global.vaultSecrets }}
- name: AWS_ACCESSKEY
- name: INBOX_ACCESSKEY
valueFrom:
secretKeyRef:
name: {{ template "sda.fullname" . }}-inbox
key: s3InboxAccessKey
- name: AWS_SECRETKEY
- name: INBOX_SECRETKEY
valueFrom:
secretKeyRef:
name: {{ template "sda.fullname" . }}-inbox
Expand All @@ -117,20 +117,24 @@ spec:
- name: SERVER_CONFFILE
value: {{ include "confFile" .}}
{{- end }}
- name: AWS_URL
value: {{ template "S3InboxURL" . }}
- name: INBOX_URL
value: {{ .Values.global.inbox.s3Url | quote }}
{{- if .Values.global.inbox.s3Port }}
- name: INBOX_PORT
value: {{ .Values.global.inbox.s3Port | quote }}
{{- end }}
{{- if and .Values.global.inbox.s3CaFile .Values.global.tls.enabled }}
- name: AWS_CACERT
- name: INBOX_CACERT
value: "{{ include "tlsPath" . }}/ca.crt"
{{- end }}
{{- if .Values.global.inbox.s3Region }}
- name: AWS_REGION
- name: INBOX_REGION
value: {{ .Values.global.inbox.s3Region | quote }}
{{- end }}
- name: AWS_BUCKET
- name: INBOX_BUCKET
value: {{ .Values.global.inbox.s3Bucket | quote }}
{{- if .Values.global.inbox.s3ReadyPath }}
- name: AWS_READYPATH
- name: INBOX_READYPATH
value: {{ .Values.global.inbox.s3ReadyPath }}
{{- end }}
- name: BROKER_HOST
Expand Down

0 comments on commit 2b87991

Please sign in to comment.