Skip to content

RFC 024: ResourcePatchPolicy for soperator#2610

Open
Uburro wants to merge 1 commit into
mainfrom
uburro/rfc-024/0
Open

RFC 024: ResourcePatchPolicy for soperator#2610
Uburro wants to merge 1 commit into
mainfrom
uburro/rfc-024/0

Conversation

@Uburro

@Uburro Uburro commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Problem

Soperator exposes only a curated subset of the K8s API for its generated resources (StatefulSet, DaemonSet, Service, ConfigMap…). Advanced users can't tweak them (annotations, tolerations, limits, hostNetwork) without requesting a new API field, forking, or fragile post-hoc patching that gets reverted on reconcile.

Solution

Adds the experimental ResourcePatchPolicy CRD (slurm.nebius.ai/v1alpha1) — a declarative escape hatch inspired by Envoy Gateway's EnvoyPatchPolicy.
JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7386) applied in-memory to generated resources before submit, re-applied every reconcile.
targetRef for SlurmCluster | NodeSet | NodeConfigurator; selection by kind + exact name; priority ordering; protected-field guards (name/namespace/ownerReferences/selector).
Status controller reports an Accepted condition; opt-in via controllersEnabled.resourcepatchpolicy (off by default).

Testing

Engine unit tests, render-level tests against the real controller/worker/node-configurator resources, and controller tests (fake client). go build, go vet, make lint and affected tests pass. Verified manually on a cluster.

Release Notes

Feature: Added the experimental ResourcePatchPolicy CRD to patch operator-generated resources via JSON Patch / JSON Merge Patch, without forking. Opt-in (controllersEnabled.resourcepatchpolicy: true); permanently v1alpha1.

@Uburro Uburro added the feature label Jun 13, 2026
@Uburro
Uburro force-pushed the uburro/rfc-024/0 branch 2 times, most recently from eaac297 to 7dfb95e Compare June 13, 2026 21:31
@Uburro
Uburro marked this pull request as ready for review June 14, 2026 10:09
@Uburro
Uburro force-pushed the uburro/rfc-024/0 branch from 7dfb95e to 07e693a Compare June 15, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant