Skip to content

Commit

Permalink
Fixing securityContext values injection.
Browse files Browse the repository at this point in the history
Fixing lint CI
  • Loading branch information
vlasov-y committed Dec 27, 2024
1 parent 5467ffa commit d7b05a5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 24 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
uses: azure/setup-helm@v4

- name: Add helm dependencies
run: |
helm repo add bitnami "https://charts.bitnami.com/bitnami"
- uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "<4.0.0"

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -40,11 +38,5 @@ jobs:
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch main

# - name: Create kind cluster
# uses: helm/kind-action@v1.2.0
# if: steps.list-changed.outputs.changed == 'true'

# - name: Run chart-testing (install)
# run: ct install --target-branch main --helm-extra-args "--timeout 10m"
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.1.19
version: 1.1.20

# This is the application version.
appVersion: "v3.16.0"
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 d7b05a5

Please sign in to comment.