etzel-mes opened a new pull request, #31376:
URL: https://github.com/apache/camel/pull/31376

   # Description
   
   The Kubernetes secret and config map refresh only watched the names 
configured in `camel.vault.kubernetes.secrets` and 
`camel.vault.kubernetescm.configmaps`, and the dev consoles listed those 
options as the ones in use. The first commit brings Kubernetes in line with the 
other vaults (CAMEL-18479 for AWS); the second trims the configured names in 
every vault refresh task.
   
   - The `secret`, `secret-binary`, `configmap` and `configmap-binary` 
functions record the names they look up through the Kubernetes client, as 
`SecretsManagerPropertiesFunction` does, and the reload tasks reload on updates 
of these names as well as the configured ones. Names read from a mount path are 
not recorded: the kubelet updates mounted files some time after the API server 
has the update, so a reload at that moment would read the old value.
   - The names in use are matched exactly, not with `contains` like the 
configured patterns. A Kubernetes event carries the exact name, and `contains` 
would also reload on unrelated secrets: `mydb-backup` for `mydb`, or the Helm 
release secrets `sh.helm.release.v1.<release>.v<n>` of an app that reads a 
secret named after its release.
   - `KubernetesInformerLoop` keeps the name and resource version of every 
resource in the namespace (not their data) and checks the name when a resource 
is updated. It used to store only the resources that matched when it listed 
them, so a name looked up after the list (a route added later, a property 
resolved at runtime) had its first update taken for a new resource.
   - The `kubernetes-secrets` and `kubernetes-configmaps` dev consoles list 
these names. The option docs, component docs and the 4.25 upgrade guide 
describe the behaviour, and the generated files and the catalog are regenerated.
   - `matchSecret` of the AWS, Azure, GCP, IBM, HashiCorp and Kubernetes 
refresh tasks used `secrets.split(",")` as is, so `a, b` never matched `b`, and 
an empty entry (`a,,b`) matched every secret. Each entry is now trimmed and 
blank ones are skipped; the HashiCorp task also reads the metadata of the 
trimmed names.
   
   Each new test fails without its change and passes with it.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   cc @davsclaus (reporter of CAMEL-27995) @oscerd
   
   _Claude Code on behalf of etzel-mes_
   


-- 
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]

Reply via email to