Skip to content

Conversation

@ajruckman
Copy link

Adds OpenShift compatibility by introducing compat.openshift.adaptSecurityContext (auto|force|disabled) and a helper that detects OpenShift. Adapts pod/container securityContext without changing defaults on vanilla Kubernetes.

This approach is similar to the pattern used by Bitnami's Valkey chart, which we are glad to have an official alternative to :)

Signed-off-by: ajruckman <[email protected]>
@ajruckman ajruckman force-pushed the feature/openshift_compat branch from 70fc7ed to fb9dcfd Compare October 13, 2025 14:52
@mk-raven mk-raven self-requested a review October 24, 2025 15:23
@mk-raven mk-raven added the enhancement New feature or request label Oct 24, 2025
@sgissi sgissi self-assigned this Nov 19, 2025
@sgissi
Copy link
Collaborator

sgissi commented Nov 19, 2025

Hi @ajruckman, sorry for the delay reviewing this. I'll rebase against the current main branch. My understanding is that if adaptSecurityContext is set to force, or if it is set to auto and Helm detects the cluster runs OpenShift, then "fsGroup", "runAsUser" and "runAsGroup" are removed from Security Context, and it will use whatever the OpenShift environment tells it to run. Is that correct? I don't quite get "seLinuxOptions", does it also need to be removed?

Would the values below achieve the same result?

podSecurityContext:
  fsGroup: null
  runAsUser: null
  runAsGroup: null
securityContext:
  runAsUser: null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants