harbinresearcher opened a new pull request, #6860: URL: https://github.com/apache/camel-k/pull/6860
Fixes #6846 ## Changes - Remove the dedicated client field from `StrimziBindingProvider` and use `BindingContext.Client` to read Kafka and KafkaTopic resources. - Use unstructured reads via the existing context client to retain direct API access. Typed context reads would introduce informer watches (not granted by the existing Strimzi roles) and restrict explicit cross-namespace reads to the manager's cached namespaces. No cache policy or RBAC changes are needed. - Preserve direct broker overrides, namespace resolution, name-first topic lookup, and bootstrap listener validation. - For the `status.topicName` fallback, list topics in the selected namespace and match the status locally. This does not require registering a custom field index on the context client's cache. - Move the existing Strimzi tests to the context fake client and cover explicit/default namespaces, unrelated topics, missing topics, and missing clusters. Add a real controller-runtime client with a local HTTP API and a rejecting cache reader to exercise cluster reads, topic reads, and list fallback without using the cache. ## Investigation The previous implementation created a separate typed client from the context client's REST config. Tests populated only the context fake client and failed with requests to localhost before the implementation change. The updated implementation uses the supplied client's resources instead. The three cache-bypass cases failed against the intermediate typed-context implementation and pass with unstructured reads. Both GET and LIST retain the context client's direct transport. The recent Strimzi v1 migration is retained. No API/CRD definitions, RBAC, dependencies, or user-facing configuration are changed. ## Validation - `go test ./pkg/util/bindings ./pkg/controller/pipe -count=1 -timeout 3m` - `go test ./pkg/util/bindings -run TestStrimzi -count=20 -timeout 3m` - `go vet ./pkg/util/bindings ./pkg/controller/pipe` - Repository `fmt` / `goimport` targets, using the prescribed goimports v0.50.0 and the script Makefile on Windows. - `git diff --check` The changed-code lint and the bindings package lint report 0 issues. Full repository lint reports 12 existing `mnd` findings in unchanged files on Windows, where configured forward-slash path exclusions do not match the Windows paths. `generate` and `update-docs` were attempted but blocked by Windows Make/Bash path handling before generators ran. No generated inputs or trait documentation were changed. Kubernetes end-to-end tests were not run locally. _AI-generated by Codex on behalf of harbinresearcher._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
