OSAC-4912: fix bundled OpenBao Deployment SCC rejection - #751
Conversation
Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
|
@ygalblum: This pull request references OSAC-4912 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ygalblum The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. WalkthroughThe bundled OpenBao Deployment pod security context no longer sets fixed user, group, or filesystem group IDs. It continues to require a non-root process. ChangesOpenBao pod security context
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The deployment now allows OpenShift to assign non-root identity values while retaining non-root enforcement. No current merge-blocking risk remains. Suggested labels: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
E2E on CodeRabbit approvalCodeRabbit APPROVED — starting expensive e2e (PR run replay).
|
|
Closing as it is addressed in #730 |
Pull request was closed
Summary
Deploymentin theosacHelm chart(
osac-installer/charts/osac/templates/bundled-openbao.yaml) hardcodedpod-level
securityContext.runAsUser: 100,runAsGroup: 1000, andfsGroup: 1000. On OpenShift, the pod's ServiceAccount (default) isonly authorized for the
restricted-v2SCC, which enforcesMustRunAsRangefrom the namespace's allocated UID range, not thesehardcoded values — so the ReplicaSet could never create a pod
(
FailedCreate/ SCC admission rejection).runAsUser/runAsGroup/fsGroup, keepingonly
runAsNonRoot: true— matching the pattern already used by otherregular Deployments in the chart (e.g.
fulfillment-grpc-server), whichlet OpenShift's SCC admission auto-assign a UID/fsGroup from the
namespace's allocated range. OpenBao's
bao server -devmode uses onlyemptyDirvolumes, so there is no fixed-ownership requirement that wouldneed a pinned UID/GID.
placement) — that PR (OSAC-4911: move bundledVault config to instance.yaml for CI profiles #750) only just fixed enabling OpenBao at all,
which exposed this pod-admission bug for the first time.
Test plan
helm upgrade --install osacsucceeded and the openbao pod came up healthy (2/2Running,
serverandbootstrapcontainers), where before the fixthe ReplicaSet was permanently stuck in
FailedCreatedue to SCCrejection.
helm template osac charts/osac -f values/vmaas-ci/instance.yaml --set bundledVault.enabled=true --set bundledVault.devRootToken=dev-root-tokenconfirms the renderedopenbao Deployment's pod securityContext now only sets
runAsNonRoot: true.yamllint --strict .passes (output identical before/after change).pre-commit run --all-filespasses.make helm-lint/make helm-validatefail only on a pre-existing,unrelated
service.externalHostname/internalHostnameschemaerror in default values.yaml — confirmed present on
mainbeforethis change too (not caused by this fix).
Fixes: https://redhat.atlassian.net/browse/OSAC-4912
Assisted-by: Claude Code noreply@anthropic.com
Changes
runAsUser,runAsGroup, andfsGroupvalues from the bundled OpenBao Deployment.runAsNonRoot: true.restricted-v2SCC.Compatibility
Risk classification