Skip to content

Commit

Permalink
fix: improve PACT_BROKER_DATABASE_PASSWORD env var configuration (#43)
Browse files Browse the repository at this point in the history
* fix: adjusting deployment affinity/nodeselector/tolerations sintax
* fix: improve PACT_BROKER_DATABASE_PASSWORD env var configuration
---------

Co-authored-by: Chris Burns <[email protected]>
  • Loading branch information
caiohasouza and ChrisJBurns authored Mar 14, 2023
1 parent 583b90c commit f37c89e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/pact-broker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pact-broker
description: The Pact Broker is an application for sharing for Pact contracts and verification results.
type: application
version: 0.7.1
version: 0.7.2
appVersion: 2.105.0.1
dependencies:
- condition: postgresql.enabled
Expand Down
30 changes: 18 additions & 12 deletions charts/pact-broker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,16 @@ spec:
- name: PACT_BROKER_DATABASE_USERNAME
value: {{ include "broker.databaseUser" . }}
- name: PACT_BROKER_DATABASE_PASSWORD
{{- if and .Values.postgresql.enabled .Values.postgresql.auth.password }}
value: {{ .Values.postgresql.auth.password | quote }}
{{- else if and .Values.externalDatabase.enabled .Values.externalDatabase.config.auth.password }}
value: {{ .Values.externalDatabase.config.auth.password | quote }}
{{- else }}
valueFrom:
secretKeyRef:
name: {{ include "broker.databaseSecretName" . }}
key: {{ include "broker.databaseSecretKey" . }}
{{- end }}
- name: PACT_BROKER_DATABASE_SSLMODE
value: {{ .Values.broker.config.databaseSslmode | quote }}
- name: PACT_BROKER_SQL_LOG_LEVEL
Expand Down Expand Up @@ -230,18 +236,6 @@ spec:
{{- toYaml .Values.broker.resources | nindent 12 }}
volumeMounts:
{{- toYaml .Values.broker.volumeMounts | nindent 12 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.broker.livenessProbe.enabled }}
livenessProbe: {{- omit .Values.broker.livenessProbe "enabled" | toYaml | nindent 12 }}
httpGet:
Expand All @@ -254,5 +248,17 @@ spec:
path: /diagnostic/status/heartbeat
port: http
{{- end }}
{{- if .Values.broker.nodeSelector }}
nodeSelector:
{{- toYaml .Values.broker.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.broker.tolerations }}
tolerations:
{{- toYaml .Values.broker.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.broker.affinity }}
affinity:
{{- toYaml .Values.broker.affinity | nindent 8 }}
{{- end }}
volumes:
{{- toYaml .Values.broker.volumes | nindent 8 }}

0 comments on commit f37c89e

Please sign in to comment.