-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SecurityContext to job container #1875
Conversation
Signed-off-by: raul <raul.cabello@suse.com>
74efafd
to
dad4c59
Compare
}, | ||
{ | ||
Name: emptyDirHomeVolumeName, | ||
MountPath: "/home/fleet-apply", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline: I believe we should not assume the user running the container will configure /home/fleet-apply
as the home. Better to explicitly set theHOME
env. variable as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in 73b3e1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is now in an env var, so it doesn't break if we change it in the Dockerfile
Home dir needs to be mounted, so we can write as readOnlyRootFileSystem is true Signed-off-by: raul <raul.cabello@suse.com>
/backport v2.8.0 release/v0.9 |
Make sure the
gitjob
pod and the job init container runs in an unprivilegedsecurityContext
. The followingsecurityContext
has been added:emptyDir
volume is mounted in the/tmp
dir in order to prevent issues when creating temporary files asreadOnlyRootFilesystem
is set to true.emptyDir
volume is mounted in the/home/fleet-ci
dir in order to prevent issue when creating helm config in the home directory.refers to #1845