diff --git a/charts/chatwoot/Chart.yaml b/charts/chatwoot/Chart.yaml index 211b092..1aa8849 100644 --- a/charts/chatwoot/Chart.yaml +++ b/charts/chatwoot/Chart.yaml @@ -34,7 +34,7 @@ sources: - http://www.chatwoot.com # This is the chart version. -version: 2.0.17 +version: 2.0.18 # This is the application version. diff --git a/charts/chatwoot/templates/migrations-job.yaml b/charts/chatwoot/templates/migrations-job.yaml index 0c445e0..0c146eb 100644 --- a/charts/chatwoot/templates/migrations-job.yaml +++ b/charts/chatwoot/templates/migrations-job.yaml @@ -42,10 +42,16 @@ spec: sleep 2; done; echo "Database ready to accept connections." ; + {{- if .Values.securityContext }} + securityContext: {{ .Values.securityContext | toYaml | nindent 10 }} + {{- end }} - name: init-redis image: busybox:1.28 imagePullPolicy: {{ .Values.image.pullPolicy }} command: ["sh", "-c", "until nslookup {{ template "chatwoot.redis.host" . }} ; do echo waiting for {{ template "chatwoot.redis.host" . }} ; sleep 2; done;"] + {{- if .Values.securityContext }} + securityContext: {{ .Values.securityContext | toYaml | nindent 10 }} + {{- end }} containers: - name: "db-migrate-job" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -80,9 +86,12 @@ spec: volumeMounts: - name: cache mountPath: /app/tmp + {{- if .Values.securityContext }} + securityContext: {{ .Values.securityContext | toYaml | nindent 10 }} + {{- end }} serviceAccountName: {{ include "chatwoot.serviceAccountName" . }} - {{- if .Values.securityContext }} - securityContext: {{ .Values.securityContext | toYaml | nindent 8 }} + {{- if .Values.podSecurityContext }} + securityContext: {{ .Values.podSecurityContext | toYaml | nindent 8 }} {{- end }} volumes: - name: cache diff --git a/charts/chatwoot/templates/tests/test-connection.yaml b/charts/chatwoot/templates/tests/test-connection.yaml index dd3eed9..825d5b9 100644 --- a/charts/chatwoot/templates/tests/test-connection.yaml +++ b/charts/chatwoot/templates/tests/test-connection.yaml @@ -24,4 +24,10 @@ spec: imagePullPolicy: IfNotPresent command: ['wget'] args: ['{{ include "chatwoot.fullname" . }}:{{ .Values.services.targetPort }}'] + {{- if .Values.securityContext }} + securityContext: {{ .Values.securityContext | toYaml | nindent 8 }} + {{- end }} + {{- if .Values.podSecurityContext }} + securityContext: {{ .Values.podSecurityContext | toYaml | nindent 8 }} + {{- end }} restartPolicy: Never diff --git a/charts/chatwoot/templates/web-deployment.yaml b/charts/chatwoot/templates/web-deployment.yaml index 9e2fbda..ae9641f 100644 --- a/charts/chatwoot/templates/web-deployment.yaml +++ b/charts/chatwoot/templates/web-deployment.yaml @@ -83,6 +83,9 @@ spec: resources: {{- toYaml . | nindent 12 }} {{- end }} + {{- if .Values.securityContext }} + securityContext: {{ .Values.securityContext | toYaml | nindent 12 }} + {{- end }} livenessProbe: httpGet: path: /health @@ -106,8 +109,8 @@ spec: - name: cache mountPath: /app/tmp serviceAccountName: {{ include "chatwoot.serviceAccountName" . }} - {{- if .Values.securityContext }} - securityContext: {{ .Values.securityContext | toYaml | nindent 8 }} + {{- if .Values.podSecurityContext }} + securityContext: {{ .Values.podSecurityContext | toYaml | nindent 8 }} {{- end }} volumes: - name: cache diff --git a/charts/chatwoot/templates/worker-deployment.yaml b/charts/chatwoot/templates/worker-deployment.yaml index 1e55b19..5055e08 100644 --- a/charts/chatwoot/templates/worker-deployment.yaml +++ b/charts/chatwoot/templates/worker-deployment.yaml @@ -75,13 +75,16 @@ spec: resources: {{- toYaml . | nindent 12 }} {{- end }} + {{- if .Values.securityContext }} + securityContext: {{ .Values.securityContext | toYaml | nindent 12 }} + {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} volumeMounts: - name: cache mountPath: /app/tmp serviceAccountName: {{ include "chatwoot.serviceAccountName" . }} - {{- if .Values.securityContext }} - securityContext: {{ .Values.securityContext | toYaml | nindent 8 }} + {{- if .Values.podSecurityContext }} + securityContext: {{ .Values.podSecurityContext | toYaml | nindent 8 }} {{- end }} volumes: - name: cache