Skip to content

Conversation

xoxys
Copy link
Member

@xoxys xoxys commented Aug 15, 2025

Supersedes: #5390
Fixes: #5389

Original PR does not allow editing. Added the missing test case.

I have added a new kubernetes backend option for configuring the [PodSecurityContext.fsGroupChangePolicy](https://> kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podsecuritycontext-v1-core) field of created job pods.

The current implementation always allows setting this option to any value. No additional requirements were put in place as I don't see a security impact of specifying this.
If the container is run as root, it does not matter whether volume files are also owned by root since root always has access. The other way around, if the container is run as non-root, the worst that can happen is for the user running it to not have access to files that placed inside the volume and owned by a different user.

@xoxys xoxys added enhancement improve existing features backend/kubernetes labels Aug 15, 2025
@xoxys xoxys changed the title Kubernetes fsgroupchangepolicy Add fsGroupChangePolicy option to Kubernetes backend Aug 15, 2025
@xoxys xoxys requested a review from a team August 15, 2025 07:35
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Aug 15, 2025

Surge PR preview deployment was removed

Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.50%. Comparing base (92a1946) to head (513c086).
⚠️ Report is 157 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5416      +/-   ##
==========================================
+ Coverage   26.30%   26.50%   +0.20%     
==========================================
  Files         402      403       +1     
  Lines       28592    28817     +225     
==========================================
+ Hits         7520     7637     +117     
- Misses      20383    20485     +102     
- Partials      689      695       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qwerty287 qwerty287 merged commit dc7795e into main Aug 15, 2025
9 checks passed
@qwerty287 qwerty287 deleted the kubernetes-fsgroupchangepolicy branch August 15, 2025 08:28
@woodpecker-bot woodpecker-bot mentioned this pull request Aug 15, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/kubernetes enhancement improve existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernets backend should allow configuring fsGroupChangePolicy
4 participants