fix(ambient-api-server): run as non-root and add OIDC secret placeholders#1547
fix(ambient-api-server): run as non-root and add OIDC secret placeholders#1547javierpena wants to merge 11 commits into
Conversation
…ders Add USER 1001 to the Dockerfile to satisfy restricted SecurityContext requirements. Add empty clientId/clientSecret keys to the base ambient-api-server Secret so the ambient-control-plane pod can start in Kind where OIDC is not configured (token auth is used instead). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe ChangesAmbient API Server Security & Configuration
Suggested labels
🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
components/manifests/base/platform/ambient-api-server-secrets.yml (1)
4-25:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd
ownerReferencesto both Secret resources (ambient-api-server-db,ambient-api-server).Both Secrets are missing
metadata.ownerReferences, which violates manifest ownership/lifecycle policy for child resources.As per coding guidelines "All child resources (Jobs, Secrets, PVCs) must have
OwnerReferencesset with controller owner refs".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@components/manifests/base/platform/ambient-api-server-secrets.yml` around lines 4 - 25, Both Secret manifests (metadata.name: ambient-api-server-db and metadata.name: ambient-api-server) are missing metadata.ownerReferences; add an ownerReferences array on each Secret pointing to the owning controller (set apiVersion, kind, name and uid of the parent/controller and set controller: true and blockOwnerDeletion: true) so they are properly garbage-collected and comply with the "child resources must have OwnerReferences" guideline; update the Secret resources with ownerReferences referencing the appropriate parent Deployment/CustomResource by its name/uid.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@components/manifests/base/platform/ambient-api-server-secrets.yml`:
- Around line 4-25: Both Secret manifests (metadata.name: ambient-api-server-db
and metadata.name: ambient-api-server) are missing metadata.ownerReferences; add
an ownerReferences array on each Secret pointing to the owning controller (set
apiVersion, kind, name and uid of the parent/controller and set controller: true
and blockOwnerDeletion: true) so they are properly garbage-collected and comply
with the "child resources must have OwnerReferences" guideline; update the
Secret resources with ownerReferences referencing the appropriate parent
Deployment/CustomResource by its name/uid.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 4ec727de-951a-4e47-8703-454ab9b06165
📒 Files selected for processing (2)
components/ambient-api-server/Dockerfilecomponents/manifests/base/platform/ambient-api-server-secrets.yml
✅ Deploy Preview for cheerful-kitten-f556a0 canceled.
|
Add USER 1001 to the Dockerfile to satisfy restricted SecurityContext requirements.
Add empty clientId/clientSecret keys to the base ambient-api-server Secret so the ambient-control-plane pod can start in Kind where OIDC is not configured (token auth is used instead).
Summary by CodeRabbit
Release Notes