Filip Jalaksa created CAMEL-21446:
-------------------------------------
Summary: 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
Created a simple integration using Karavan
- 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}}
When using the default value in the property placeholders, default is returned
even if the key is present.
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}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)