Skip to content
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 deployment and init container #331

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

raulcabello
Copy link
Contributor

@raulcabello raulcabello commented Oct 11, 2023

Make sure the gitjob pod and the job init container runs in an unprivileged securityContext. The following securityContext has been added:

securityContext:
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true
  privileged: false
  runAsNonRoot: true
  seccompProfile:
    type: RuntimeDefault
  capabilities:
    drop:
      - ALL

emptyDir volume is mounted in the /tmp dir in order to prevent issues when creating temporary files as readOnlyRootFilesystem is set to true

refers to rancher/fleet#1845

@raulcabello raulcabello merged commit 1d4a2bb into master Oct 16, 2023
@raulcabello raulcabello deleted the security-context branch October 16, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants