feat(operator): add administrative provider drain - #126
Open
nerdalert wants to merge 3 commits into
Open
Conversation
Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
praxis-bot
reviewed
Sep 8, 2026
praxis-bot
left a comment
Collaborator
There was a problem hiding this comment.
praxis-bot review
Well-structured feature. The operator-side drain logic is clean and correct: apply_administrative_drain is pure, only caps NewAndExisting to ExistingOnly, and never overrides hard exclusions. CRD, Helm, and deploy artifacts are consistent. The RestorationGuard with Drop-based cleanup and the bounded retry/rollback in the xtask are solid operational safety patterns. Test coverage is thorough across unit, CRD round-trip, and e2e qualification scenarios.
Two medium findings below on the overlay lookup in the xtask convergence path.
Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds reversible administrative draining for individual inference providers and for all providers explicitly associated with a provider gateway.
A drained provider remains in the routing overlay as
existing_only: existing affinity sessions may continue using it, while new sessions are placed elsewhere. Health, trust, freshness, and exclusion decisions continue to take precedence, so draining or undraining cannot make an otherwise ineligible provider routable.Changes
InferenceProvider.spec.trafficPolicy.drainto the API, generated CRDs, and Helm schema/template.InferenceProvider.spec.gatewayRefadministrative grouping metadata.cargo xtask env provider-drainwith mutually exclusive--providerand--gatewayselectors, dry-run support, bounded kubectl operations, and optional accepted/serving revision convergence checks.gatewayRefis grouping metadata used by the administrative command. Gateway-wide drain is an explicit client-side fan-out; it does not add request-time Grid behavior or infer membership from endpoint URLs.Validation
Static validation passed:
cargo test --workspace: 561 passedcargo clippy --workspace --all-targets -- -D warningsmake testmake docmake lintgit diff --checkFresh Kind validation from the final source passed twice:
The initial attempt used the mock-provider image for the VCR backend and failed before scenarios; its automatic cleanup passed. The two corrected runs used fresh role-appropriate images and completed successfully.
No AI or Praxis changes are included.