Skip to content

Commit c51891c

Browse files
committed
fix securityContext for kaniko and agent
1 parent f1504f0 commit c51891c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

charts/github-actions-runner/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.2.11
18+
version: 0.2.12
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/github-actions-runner/templates/deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ spec:
4545
{{- if .Values.runner.kaniko.enabled }}
4646
- name: {{ .Chart.Name }}-kaniko
4747
securityContext:
48-
{{- toYaml .Values.securityContext | nindent 12 }}
48+
runAsUser: 0
49+
readOnlyRootFilesystem: false
4950
image: {{ include "github-actions-runner.runner-image-kaniko" . }}
5051
resources:
5152
{{- toYaml .Values.resources | nindent 12 }}

charts/github-actions-runner/values.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,19 @@ serviceAccount:
4747
podAnnotations: {}
4848

4949
podSecurityContext:
50-
runAsNonRoot: true
51-
runAsUser: 1000
52-
fsGroup: 1000
50+
{}
51+
# runAsNonRoot: false
52+
# runAsUser: 1000
53+
# fsGroup: 1000
5354

55+
# does not apply on kaniko
5456
securityContext:
55-
{}
57+
readOnlyRootFilesystem: false
58+
runAsNonRoot: true
59+
runAsUser: 1000
5660
# capabilities:
5761
# drop:
5862
# - ALL
59-
# readOnlyRootFilesystem: true
60-
# runAsNonRoot: true
61-
# runAsUser: 1000
6263

6364
resources:
6465
{}

0 commit comments

Comments
 (0)