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.0.18


# This is the application version.
Expand Down
13 changes: 11 additions & 2 deletions charts/chatwoot/templates/migrations-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions charts/chatwoot/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Comment on lines 26 to +28

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 Use non-writing wget mode in connection test pod

This hook pod now inherits .Values.securityContext, but the command still runs plain wget <url>, which performs a download/write by default (wget --help exposes --spider as the no-download mode). In hardened setups (for example runAsNonRoot and/or readOnlyRootFilesystem from chart security settings), that can make helm test fail due to filesystem write restrictions even when the service is reachable. Switching the probe command to a non-writing mode avoids false-negative test failures.

Useful? React with 👍 / 👎.

{{- end }}
{{- if .Values.podSecurityContext }}
securityContext: {{ .Values.podSecurityContext | toYaml | nindent 8 }}
{{- end }}
restartPolicy: Never
7 changes: 5 additions & 2 deletions charts/chatwoot/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ spec:
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
path: /health
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions charts/chatwoot/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading