Skip to content

Commit

Permalink
fix: existingSecret usage for postgres (#83)
Browse files Browse the repository at this point in the history
* fix existingSecret for postgres

* chore: increment chart version

Co-authored-by: Vishnu Narayanan <[email protected]>
  • Loading branch information
cortopy and vishnu-narayanan authored Oct 18, 2022
1 parent 9a5de25 commit 3cbb704
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/chatwoot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sources:
- http://www.chatwoot.com

# This is the chart version.
version: 1.0.5
version: 1.0.6

# This is the application version.
appVersion: "v2.9.1"
2 changes: 1 addition & 1 deletion charts/chatwoot/templates/env-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data:
POSTGRES_HOST: {{ include "chatwoot.postgresql.host" . | b64enc | quote }}
POSTGRES_PORT: {{ include "chatwoot.postgresql.port" . | b64enc | quote }}
POSTGRES_USERNAME: {{ default "postgres" .Values.postgresql.auth.username | b64enc | quote }}
{{- if not .Values.postgresql.existingSecret }}
{{- if not .Values.postgresql.auth.existingSecret }}
POSTGRES_PASSWORD: {{ default "postgres" .Values.postgresql.auth.postgresPassword | b64enc | quote }}
{{- end }}
POSTGRES_DATABASE: {{ default "chatwoot_production" .Values.postgresql.auth.database | b64enc | quote }}
Expand Down
6 changes: 3 additions & 3 deletions charts/chatwoot/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ spec:
command:
- docker/entrypoints/rails.sh
env:
{{- if .Values.postgresql.existingSecret }}
{{- if .Values.postgresql.auth.existingSecret }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.postgresql.existingSecret }}
key: {{ default "password" .Values.postgresql.existingSecretKey }}
name: {{ .Values.postgresql.auth.existingSecret }}
key: {{ default "password" .Values.postgresql.auth.existingSecretKey }}
{{- end }}
{{- if .Values.redis.existingSecret }}
- name: REDIS_PASSWORD
Expand Down
6 changes: 3 additions & 3 deletions charts/chatwoot/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ spec:
- -C
- config/sidekiq.yml
env:
{{- if .Values.postgresql.existingSecret }}
{{- if .Values.postgresql.auth.existingSecret }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.postgresql.existingSecret }}
key: {{ default "password" .Values.postgresql.existingSecretKey }}
name: {{ .Values.postgresql.auth.existingSecret }}
key: {{ default "password" .Values.postgresql.auth.existingSecretKey }}
{{- end }}
{{- if .Values.redis.existingSecret }}
- name: REDIS_PASSWORD
Expand Down

0 comments on commit 3cbb704

Please sign in to comment.