gitPratikSingh opened a new pull request, #6926: URL: https://github.com/apache/camel-k/pull/6926
Fixes #6378 ## What this changes - Extracts the discovery x RBAC intersection from `getDeletableTypes` into the pure, unit-tested `deletableTypesFromDiscovery` helper in `pkg/trait/gc.go`. Behavior is unchanged: discovery stays the source of deletable types, so resources created by other traits (for example Knative `Service`/`Trigger` or KEDA `ScaledObject` resources) are not silently dropped the way a fixed list would drop them. - Adds unit tests for the helper in `pkg/trait/gc_test.go` covering exact match, wildcard rules, rules without the delete verb, group/resource mismatches, and invalid GroupVersion handling. - Adds a garbage collection architecture doc page (`docs/modules/ROOT/pages/architecture/garbage-collection.adoc`) explaining generations, when GC runs, how deletable types are computed, the one-minute discovery cache, and the six-type fallback set, with a nav entry. ## Verification - `go test ./pkg/trait/ -run 'TestDeletableTypesFromDiscovery|TestGarbageCollect|TestConfigureGC'` passes. - `gofmt` clean and `golangci-lint run pkg/trait/` reports 0 issues. - `make generate` / `make update-docs` produce no changes: no CRD, RBAC, or autogenerated trait-doc surface is touched. -- 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]
