Skip to content

Allow downstream builds to stage create admissions#475

Draft
ilackarms wants to merge 1 commit into
mainfrom
feat/approval-process
Draft

Allow downstream builds to stage create admissions#475
ilackarms wants to merge 1 commit into
mainfrom
feat/approval-process

Conversation

@ilackarms
Copy link
Copy Markdown
Contributor

@ilackarms ilackarms commented May 5, 2026

Description

Adds a small OSS extension seam that lets downstream builds stage create attempts before production upsert. The shared resource apply path now accepts a create-staging hook, returns a staged apply result, and exposes finalized resource-route context so downstream code can reuse the same stores, validators, post hooks, and authorization wiring as normal v1alpha1 resources.

This keeps OSS behavior unchanged by default while giving downstream approval flows a narrow integration point instead of duplicating the generic resource pipeline.

Change Type

/kind feature

Changelog

Add extension points for downstream create-admission staging in the generic v1alpha1 resource pipeline.

Additional Notes

Validation run locally:

  • go test ./...
  • git diff --check origin/main...HEAD

This PR is the OSS prerequisite for the downstream approval-flow PR.

Create approval needs a production-neutral interception point: downstream enterprise code must be able to validate a create, persist it outside the v1alpha1 tables, and report a staged apply result without running post-upsert hooks.

This adds a create-stager hook, staged apply status, and resolver wrapper plumbing while keeping the default OSS path unchanged. The wrapper lets downstream builds decide whether non-production references should validate before CRUD and batch apply handlers capture the shared resolver.

Constraint: Enterprise approval rows must not create deployment side effects before admin approval.

Rejected: Stage after production upsert | would create runtime deployments before admission approval.

Rejected: Enterprise-only fork of /v0/apply | would drift from the shared resource pipeline.

Confidence: high

Scope-risk: moderate

Directive: Keep deployment reconciliation behind production upsert/post-upsert; staged creates must not run PostUpsert hooks.

Tested: rtk go test ./...

Tested: go test ./internal/registry/api/router

Not-tested: Live enterprise docker approval e2e in OSS repo; covered by enterprise e2e compile and integration tests.
@ilackarms ilackarms changed the title Allow enterprise builds to stage create admissions Allow downstream builds to stage create admissions May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant