Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
[sda-svc] simplify BROKER_SSL handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Dec 22, 2021
1 parent ecde460 commit 7ed3091
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 35 deletions.
7 changes: 2 additions & 5 deletions charts/sda-svc/templates/backup-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ spec:
value: {{ .Values.global.broker.vhost | quote }}
- name: BROKER_SERVERNAME
value: {{ .Values.global.broker.host | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_SSL
value: "true"
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand All @@ -146,9 +146,6 @@ spec:
- name: BROKER_CLIENTKEY
value: {{ include "tlsPath" . }}/{{ .Values.backup.tls.keyFile }}
{{- end }}
{{- else }}
- name: BROKER_SSL
value: "false"
{{- end }}
{{- if .Values.global.tls.enabled }}
{{- if or (eq "verify-ca" .Values.global.db.sslMode) (eq "verify-full" .Values.global.db.sslMode) }}
Expand Down
7 changes: 2 additions & 5 deletions charts/sda-svc/templates/finalize-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ spec:
value: {{ .Values.global.broker.vhost | quote }}
- name: BROKER_SERVERNAME
value: {{ .Values.global.broker.host | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_SSL
value: "true"
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand All @@ -97,9 +97,6 @@ spec:
- name: BROKER_CLIENTKEY
value: {{ include "tlsPath" . }}/{{ .Values.finalize.tls.keyFile }}
{{- end }}
{{- else }}
- name: BROKER_SSL
value: "false"
{{- end }}
{{- if .Values.global.tls.enabled }}
{{- if or (eq "verify-ca" .Values.global.db.sslMode) (eq "verify-full" .Values.global.db.sslMode) }}
Expand Down
7 changes: 2 additions & 5 deletions charts/sda-svc/templates/ingest-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ spec:
- name: ARCHIVE_LOCATION
value: "{{ .Values.global.archive.volumePath }}/"
{{- end }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_CACERT
value: {{ template "tlsPath" . }}/{{ .Values.ingest.tls.caCert }}
Expand All @@ -100,13 +102,8 @@ spec:
- name: BROKER_CLIENTKEY
value: {{ template "tlsPath" . }}/{{ .Values.ingest.tls.keyFile }}
{{- end }}
- name: BROKER_SSL
value: "true"
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
{{- else }}
- name: BROKER_SSL
value: "false"
{{- end }}
- name: BROKER_DURABLE
value: {{ .Values.global.broker.durable | quote }}
Expand Down
7 changes: 2 additions & 5 deletions charts/sda-svc/templates/intercept-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ spec:
- name: CONFIGFILE
value: {{ template "confFile" . }}
{{- end }}
- name: BROKER_SSL
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_CACERT
value: {{ template "tlsPath" . }}/{{ .Values.intercept.tls.caCert }}
Expand All @@ -77,13 +79,8 @@ spec:
- name: BROKER_CLIENTKEY
value: {{ template "tlsPath" . }}/{{ .Values.intercept.tls.keyFile }}
{{- end }}
- name: BROKER_SSL
value: {{ .Values.global.broker.ssl | quote}}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
{{- else }}
- name: BROKER_SSL
value: "false"
{{- end }}
- name: BROKER_DURABLE
value: "true"
Expand Down
7 changes: 2 additions & 5 deletions charts/sda-svc/templates/mapper-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ spec:
value: {{ .Values.global.broker.vhost | quote }}
- name: BROKER_SERVERNAME
value: {{ .Values.global.broker.host | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_SSL
value: "true"
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand All @@ -95,9 +95,6 @@ spec:
- name: BROKER_CLIENTKEY
value: {{ template "tlsPath" . }}/{{ .Values.mapper.tls.keyFile }}
{{- end }}
{{- else }}
- name: BROKER_SSL
value: "false"
{{- end }}
{{- if .Values.global.tls.enabled }}
{{- if or (eq "verify-ca" .Values.global.db.sslMode) (eq "verify-full" .Values.global.db.sslMode) }}
Expand Down
7 changes: 2 additions & 5 deletions charts/sda-svc/templates/s3-inbox-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ spec:
value: {{ .Values.global.broker.exchange | quote }}
- name: BROKER_ROUTINGKEY
value: "inbox"
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_SSL
value: "true"
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand All @@ -114,9 +114,6 @@ spec:
- name: BROKER_CLIENTKEY
value: {{ include "tlsPath" . }}/{{.Values.s3Inbox.tls.keyFile }}
{{- end }}
{{- else }}
- name: BROKER_SSL
value: "false"
{{- end }}
{{- if .Values.global.tls.enabled }}
- name: SERVER_CERT
Expand Down
7 changes: 2 additions & 5 deletions charts/sda-svc/templates/verify-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ spec:
- name: ARCHIVE_LOCATION
value: "{{ .Values.global.archive.volumePath }}"
{{- end }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_SSL
value: "true"
value: {{ .Values.global.tls.enabled | quote }}
{{- if and .Values.global.broker.ssl .Values.global.tls.enabled }}
- name: BROKER_VERIFYPEER
value: {{ .Values.global.broker.verifyPeer | quote }}
- name: BROKER_CACERT
Expand All @@ -104,9 +104,6 @@ spec:
- name: BROKER_CLIENTKEY
value: {{ template "tlsPath" . }}/{{.Values.verify.tls.keyFile }}
{{- end }}
{{- else }}
- name: BROKER_SSL
value: "false"
{{- end }}
- name: BROKER_DURABLE
value: {{ .Values.global.broker.durable | quote }}
Expand Down

0 comments on commit 7ed3091

Please sign in to comment.