Skip to content

Commit

Permalink
Fixing securityContext values injection.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasov-y authored Dec 27, 2024
1 parent 5467ffa commit 6e24b84
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions charts/chatwoot/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ spec:
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
containers:
- args:
- name: {{ .Chart.Name }}-web
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
args:
- bundle
- exec
- rails
Expand Down Expand Up @@ -74,8 +76,10 @@ spec:
- secretRef:
name: {{ .Values.existingEnvSecret }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
name: {{ .Chart.Name }}-web
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- containerPort: {{ int .Values.services.internalPort }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand All @@ -87,8 +91,9 @@ spec:
- name: cache
mountPath: /app/tmp
serviceAccountName: {{ include "chatwoot.serviceAccountName" . }}
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: cache
Expand Down
15 changes: 10 additions & 5 deletions charts/chatwoot/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ spec:
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
containers:
- args:
- name: {{ .Chart.Name }}-workers
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
args:
- bundle
- exec
- sidekiq
Expand Down Expand Up @@ -69,8 +71,10 @@ spec:
- secretRef:
name: {{ .Values.existingEnvSecret }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
name: {{ .Chart.Name }}-workers
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.worker.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand All @@ -80,8 +84,9 @@ spec:
- name: cache
mountPath: /app/tmp
serviceAccountName: {{ include "chatwoot.serviceAccountName" . }}
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: cache
Expand Down

0 comments on commit 6e24b84

Please sign in to comment.