[
https://issues.apache.org/jira/browse/CAMEL-21446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-21446.
---------------------------------
Resolution: Fixed
> configmap/secret - default takes precedence
> -------------------------------------------
>
> Key: CAMEL-21446
> URL: https://issues.apache.org/jira/browse/CAMEL-21446
> Project: Camel
> Issue Type: Bug
> Components: camel-kubernetes
> Affects Versions: 4.8.1
> Reporter: Filip Jalaksa
> Assignee: Marco Carletti
> Priority: Minor
> Fix For: 4.8.2, 4.9.0
>
>
> Created a simple integration using Karavan
> {code:java}
> - rest:
> id: rest-d471
> post:
> - id: post-126a
> path: /injectionTest
> to: direct:injectionTest
> - route:
> id: route-a292
> from:
> id: from-b12a
> uri: direct
> parameters:
> name: injectionTest
> steps:
> - to:
> id: to-bab9
> uri: kubernetes-config-maps
> parameters:
> namespace: default
> masterUrl: kubernetes.default.svc:443
> operation: listConfigMaps
> - marshal:
> id: marshal-55e5
> json:
> id: json-b0d1
> - log:
> id: log-d04e
> message: >-
> Printing test configmap without default
> {{configmap:secondmap/test}}
> - log:
> id: log-3396
> message: Printing test secret without default
> {{secret:secondsecret/test}}
> - log:
> id: log-f123
> message: >-
> Printing test configmap with default
> {{configmap:secondmap/test:default}}
> - log:
> id: log-f123
> message: >-
> Printing test secret with default
> {{configmap:secondsecret/test:default}} {code}
> Output in my testing minikube container:
> {code:java}
> 2024-11-13 09:56:49.377 INFO 1 --- [worker-thread-0] configmap.camel.yaml:26
> : Printing test configmap without default working
> 2024-11-13 09:56:49.380 INFO 1 --- [worker-thread-0] configmap.camel.yaml:31
> : Printing test secret without default mysecretvalue
> 2024-11-13 09:56:49.382 INFO 1 --- [worker-thread-0] configmap.camel.yaml:34
> : Printing test configmap with default default
> 2024-11-13 09:56:49.383 INFO 1 --- [worker-thread-0] configmap.camel.yaml:39
> : Printing test secret with default default {code}
> So when using the default in property placeholders it will take precedence
> even if given key is present.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)