-
Notifications
You must be signed in to change notification settings - Fork 207
fix(inferenceModelRewrites): conditionally skip watching InferenceModelRewrite and InferenceObjective #1967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…enceObjective when disableK8sCrdReconcile is true This fixes an issue where the controller manager would fail to start if the InferenceModelRewrite or InferenceObjective CRDs were missing. This change introduces a dynamic check for the existence of these CRDs before attempting to set up reconcilers or adding them to the cache. This allows the controller to gracefully handle environments where these optional CRDs are not installed, even when CRD reconciliation is generally enabled. Refactoring: - Moved kindExists to pkg/epp/server/controller_manager.go - Updated kindExists signature to accept discovery.DiscoveryInterface - Reused discovery client in NewDefaultManager and ExtProcServerRunner.SetupWithManager to avoid repeated client creation overhead. Done by: gemini-cli TEST=go test ./pkg/epp/server/... passed
|
This is another inferenceModelRewrites hardening PR. This will let both I tested this working well by deleting the |
| ) | ||
|
|
||
| type ControllerConfig struct { | ||
| disableK8sCrdReconcile bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would flip this from disable to enable semantic, also rename to startCrdReconcilers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly to avoid cases like !disable, double negate is not a good pattern
ahg-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me, left one nit, let me know if you agree
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahg-g, zetxqx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
/kind cleanup
What this PR does / why we need it:
This fixes an issue where the controller manager would fail to start if the InferenceModelRewrite or InferenceObjective CRDs were missing. This change introduces a dynamic check for the existence of these CRDs before attempting to set up reconcilers or adding them to the cache. This allows the controller to gracefully handle environments where these optional CRDs are not installed, even when CRD reconciliation is generally enabled.
Tested with deleting the
inferenceModelRewrites CRDand start the EPP successfully.Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: