[WIP] Update Gateway API Inference Extension to v1#906
Conversation
Signed-off-by: Killian Golds <kgolds@redhat.com>
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: KillianGolds The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Killian Golds <kgolds@redhat.com>
Signed-off-by: Killian Golds <kgolds@redhat.com>
| var needsAnnotationUpdate bool | ||
|
|
||
| // Check if we've already committed to v1 | ||
| if llmSvc.Annotations != nil && llmSvc.Annotations[AnnotationInferencePoolMigrated] == "v1" { |
There was a problem hiding this comment.
I would use the child objects to record the persistent failover to v1
There was a problem hiding this comment.
a good pattern to follow is to never touch the spec and metadata of user managed objects
| if llmSvc.Annotations == nil { | ||
| llmSvc.Annotations = make(map[string]string) | ||
| } | ||
| llmSvc.Annotations[AnnotationInferencePoolMigrated] = "v1" |
| _, err = res.Update(ctx, u, metav1.UpdateOptions{}) | ||
| return err | ||
| } | ||
| _, err = res.Create(ctx, u, metav1.CreateOptions{}) |
There was a problem hiding this comment.
As we discussed, we need to mimic the Reconcile function in lifecycle_crud.go
pierDipi
left a comment
There was a problem hiding this comment.
Feedback:
- re-route the PR to target the release branch
release-v0.15 - add tests in controller_int_test.go
Apply lifecycle_crud.go patterns to dynamic client reconciliation: ownership checks, semantic equality, event emission. Break down large migration function into helpers. Store state on child objects. Signed-off-by: Killian Golds <kgolds@redhat.com>
What this PR does / why we need it:
Migrates the Gateway API Inference Extension (GIE) from v1alpha2 to v1.0.0 while maintaining backward compatibility through a dual-pool strategy.
The controller creates both v1 and v1alpha2 InferencePool objects simultaneously, using v1 as the primary interface while allowing v1alpha2 to function as a fallback in environments without GIE v1 controller integration (e.g., current OpenShift).
Key changes:
ToCorev1PodSpec()method for structured-merge-diff v6 compatibilityWhich issue(s) this PR fixes:
Fixes RHOAIENG-34472
Type of changes
Upstream Blockers Resolved:
This PR encountered several upstream dependency issues requiring coordination with multiple projects:
GIE v1.0.0 Validation Bug (kubernetes-sigs/gateway-api-inference-extension#1679)
Kubernetes v0.34 Upgrade Requirement
Gateway API Validation Markers Bug (kubernetes-sigs/gateway-api#4172)
Feature/Issue validation/testing:
Special notes for your reviewer:
Known Limitations:
Please confirm that if this PR changes any image versions, then that’s the sole change this PR makes.
Checklist:
Release note:
Re-running failed tests: