davsclaus opened a new pull request, #30024:
URL: https://github.com/apache/camel/pull/30024

   JIRA: [CAMEL-26934](https://issues.apache.org/jira/browse/CAMEL-26934), item 
5 and two bullets of item 6.
   
   ## What changes
   
   - **Volume names (item 5).** `MountTrait` named a volume after its 
configmap, secret or claim. So `--config configmap:db --config secret:db`, or 
`secret:foo` together with `secret:foo/key-foo`, gave two volumes of the same 
name in the pod, which the API server refuses. A second volume of the same name 
now gets `-2`, a third `-3`, and so on (kept within 63 characters); the first 
keeps its name, so manifests that were valid do not change. `shouldAddConfigs` 
and `shouldAddResources` asserted the duplicate names; they now check that each 
mount names its own volume.
   - **`kubernetes run --property` (item 6).** Any value with a path separator 
was taken for a properties file. `camel.server.path=/api` then named a file 
that does not exist, and the property was left out without a word. A 
`key=value` (no path in the key) is now a property. `file:path` and a path are 
properties files, and one that does not exist exits with 66 instead of being 
ignored.
   - **Trait values with a comma (item 6).** A value with a comma was split 
into a list even when quoted, so `cronjob.schedule=0 1,13 * * *` failed with a 
Jackson error (exit 70). A quoted value is one value, and so is `schedule`. A 
list of quoted items, such as `'MY_VAR="my value"','MY_ENV=fuzz'`, is still a 
list.
   
   End to end, `camel kubernetes export tick.camel.yaml --trait 
cronjob.enabled=true --trait 'cronjob.schedule=0 1,13 * * *' --config 
configmap:db --config secret:db`:
   - main: exit 70;
   - this PR: exit 0, with `schedule: 0 1,13 * * *`, and the volumes `db` 
(configmap) and `db-2` (secret) in `cronjob.yml`.
   
   ## Tests
   
   - `KubernetesExportTest.aConfigmapAndASecretOfTheSameNameAreTwoVolumes`; 
`shouldAddConfigs` and `shouldAddResources` updated.
   - `KubernetesRunPropertiesTest` (new): a value that is a path, properties 
files, and a file that does not exist.
   - `TraitHelperTest`: a cron schedule with a comma, and a quoted value with a 
comma.
   - Kubernetes plugin suite: 171 tests, green.
   
   Upgrade guide: a `camel kubernetes` entry for the three changes.
   
   Left of item 6: `--profile` dropping traits, `ingress.annotations`, image 
settings, `KubernetesHelper.sanitize` (`my.app.v2` → `my`; it is meant for 
names derived from file names, so a change renames existing workloads), and 
`cronjob.enabled` without a schedule.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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