Conversation
Signed-off-by: git-jxj <xinjun.jiang@daocloud.io>
Author
|
The GitHub Actions runs for current head |
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.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Deleting a managed ConfigMap leaves its adapter mappings active: the reconciler receives
NotFoundand passes an empty ConfigMap to the store, which cannot identify the cached entry. Requests keep receiving the deleted base model in their routing header.Preserve the reconcile key and cache each ConfigMap's base model so deletion can remove its mappings without reading the deleted object. Keep base-model reference counts consistent when a ConfigMap changes its base model.
Regression tests exercise reconciliation after deleting same-named ConfigMaps in different namespaces, verify the plugin's routing headers, and cover shared base models, repeated deletion, and base-model updates. Both new tests fail on the upstream baseline.
Validation:
make test(including race detection and integration tests),make lint(0 issues), andgit diff --check.Also ran the deletion lifecycle against a real Kubernetes 1.35 API server and etcd using a temporary envtest fixture. On unmodified main, both deleted adapters and the last base model still produce a routing header. The same check passes with the fix. This validates reconciliation and plugin output; it is not a deployed gateway end-to-end test.
Which issue(s) this PR fixes:
Found through code review.
Release note (write
NONEif no user-facing change):