Skip to content

Conversation

@stehessel
Copy link
Contributor

Make runAsUser conditional based on platform to fix OpenShift Security Context Constraint errors while maintaining security for vanilla K8s.

  • On vanilla K8s: sets runAsUser: 1000 (required for non-root execution)
  • On OpenShift: omits runAsUser (allows SCC to assign dynamic UID)
  • Both platforms maintain runAsNonRoot: true for security validation

This follows the existing pattern used for NeedsPrivileged conditional settings and resolves SCC forbidden errors like:
"runAsUser: Invalid value: 1000: must be in the ranges: [1000670000, 1000679999]"

🤖 Generated with Claude Code

Make runAsUser conditional based on platform to fix OpenShift Security
Context Constraint errors while maintaining security for vanilla K8s.

- On vanilla K8s: sets runAsUser: 1000 (required for non-root execution)
- On OpenShift: omits runAsUser (allows SCC to assign dynamic UID)
- Both platforms maintain runAsNonRoot: true for security validation

This follows the existing pattern used for NeedsPrivileged conditional
settings and resolves SCC forbidden errors like:
"runAsUser: Invalid value: 1000: must be in the ranges: [1000670000, 1000679999]"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@porridge
Copy link
Collaborator

porridge commented Dec 2, 2025

Please update the PR summary before merging.

@porridge
Copy link
Collaborator

Testing in:

@porridge porridge changed the title [NOTE: not tested yet] fix: make runAsUser conditional for OpenShift compatibility fix: make runAsUser conditional for OpenShift compatibility Dec 10, 2025
@porridge porridge marked this pull request as ready for review December 10, 2025 13:00
@porridge porridge merged commit 3d1ac85 into master Dec 10, 2025
4 checks passed
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