Skip to content

Commit

Permalink
add security context runAsNonRoot option (#163)
Browse files Browse the repository at this point in the history
Signed-off-by: Vivian Noronha <[email protected]>
  • Loading branch information
Vivian Noronha authored Nov 27, 2020
1 parent c00b41a commit b239117
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charts/jenkins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Use the following links to reference issues, PRs, and commits prior to v2.6.0.
The change log until v1.5.7 was auto-generated based on git commits.
Those entries include a reference to the git commit to be able to get more details.

## 3.0.1

* added 'runAsNonroot' to security context

## 3.0.0

* Chart uses StatefulSet instead of Deployment
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: jenkins
home: https://jenkins.io/
version: 3.0.0
version: 3.0.1
appVersion: 2.249.3
description: Jenkins - Build great things at any scale! The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project.
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
{{- if and (.Values.controller.runAsUser) (.Values.controller.fsGroup) }}
{{- if not (eq (int .Values.controller.runAsUser) 0) }}
fsGroup: {{ .Values.controller.fsGroup }}
runAsNonRoot: true
{{- end }}
{{- if .Values.controller.securityContextCapabilities }}
capabilities:
Expand Down
2 changes: 2 additions & 0 deletions charts/jenkins/tests/jenkins-controller-statefulset-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ tests:
securityContext:
fsGroup: 1000
runAsUser: 1000
runAsNonRoot: true
serviceAccountName: my-release-jenkins
volumes:
- emptyDir: {}
Expand Down Expand Up @@ -271,6 +272,7 @@ tests:
value:
runAsUser: 2000
fsGroup: 4000
runAsNonRoot: true
capabilities:
drop:
- NET_RAW
Expand Down

0 comments on commit b239117

Please sign in to comment.