Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/chatwoot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sources:
- http://www.chatwoot.com

# This is the chart version.
version: 2.0.17
version: 2.1.0


# This is the application version.
Expand Down
6 changes: 6 additions & 0 deletions charts/chatwoot/templates/migrations-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,16 @@ spec:
volumeMounts:
- name: cache
mountPath: /app/tmp
{{- with .Values.hooks.migrate.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
Comment on lines +83 to +84

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mount extra migration volumes into the init-postgres step too

When hooks.migrate.extraVolumeMounts is used to supply file-backed Postgres settings (for example a custom CA or .pgpass), the migration hook can still fail before db-migrate-job starts: init-postgres in charts/chatwoot/templates/migrations-job.yaml runs pg_isready first, but these new mounts are only attached here to the main container. In that setup the init container cannot read the mounted files, so the Job never reaches the container that has the extra-volume support.

Useful? React with 👍 / 👎.

{{- end }}
serviceAccountName: {{ include "chatwoot.serviceAccountName" . }}
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
volumes:
- name: cache
emptyDir: {}
{{- with .Values.hooks.migrate.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/chatwoot/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,17 @@ spec:
volumeMounts:
- name: cache
mountPath: /app/tmp
{{- with .Values.web.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
serviceAccountName: {{ include "chatwoot.serviceAccountName" . }}
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
volumes:
- name: cache
emptyDir: {}
{{- with .Values.web.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}

6 changes: 6 additions & 0 deletions charts/chatwoot/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,17 @@ spec:
volumeMounts:
- name: cache
mountPath: /app/tmp
{{- with .Values.worker.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
serviceAccountName: {{ include "chatwoot.serviceAccountName" . }}
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
volumes:
- name: cache
emptyDir: {}
{{- with .Values.worker.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}

30 changes: 30 additions & 0 deletions charts/chatwoot/values.test-volumes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
web:
extraVolumes:
- name: test-web-config
configMap:
name: test-configmap
extraVolumeMounts:
- name: test-web-config
mountPath: /etc/test-web-config
readOnly: true

worker:
extraVolumes:
- name: test-worker-config
configMap:
name: test-configmap
extraVolumeMounts:
- name: test-worker-config
mountPath: /etc/test-worker-config
readOnly: true

hooks:
migrate:
extraVolumes:
- name: test-migrate-config
configMap:
name: test-configmap
extraVolumeMounts:
- name: test-migrate-config
mountPath: /etc/test-migrate-config
readOnly: true
30 changes: 30 additions & 0 deletions charts/chatwoot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ web:
# requests:
# cpu: 250m
# memory: 256Mi
# extraVolumes:
# - name: my-config
# configMap:
# name: my-configmap
extraVolumes: []
# extraVolumeMounts:
# - name: my-config
# mountPath: /etc/my-config
# readOnly: true
extraVolumeMounts: []
worker:
hpa:
# set this to true to enable horizontal pod autoscaling
Expand All @@ -54,6 +64,16 @@ worker:
# requests:
# cpu: 250m
# memory: 256Mi
# extraVolumes:
# - name: my-config
# configMap:
# name: my-configmap
extraVolumes: []
# extraVolumeMounts:
# - name: my-config
# mountPath: /etc/my-config
# readOnly: true
extraVolumeMounts: []

services:
name: chatwoot
Expand Down Expand Up @@ -186,6 +206,16 @@ hooks:
# Defaults to performing the DB migration job after the install/upgrade.
# Can be overridden to "pre-install,pre-upgrade" with caution to perform migrations that are sometimes required for the deployment to become healthy
hookAnnotation: "post-install,post-upgrade"
# extraVolumes:
# - name: my-config
# configMap:
# name: my-configmap
extraVolumes: []
# extraVolumeMounts:
# - name: my-config
# mountPath: /etc/my-config
# readOnly: true
extraVolumeMounts: []

# ENVIRONMENT VARIABLES

Expand Down
Loading