Pass Security Context to Jenkins-Kubernetes Plugin
The workaround I got was to give a "777" access to JENKINS_HOME in one pod in the Kubernetes Host. This persisted in all of the other pods that got created too. In this way, everytime my container runs with jenkins user , it was able to create workspace in jenkins_home dir which had nobody user access.
There is an option to specify RunAsUser
and FsGroup
when you install jenkins using a helm chart. You can also specify your PersistentVolumeClaim
. See the values.yaml
here - https://github.com/kubernetes/charts/tree/master/stable/jenkins