Michael Weiss created CAMEL-24940:
-------------------------------------
Summary: camel-kubernetes - autodetection of Kubernetes property
placeholder functions (configmap:, secret:) stopped working in 4.22.1
Key: CAMEL-24940
URL: https://issues.apache.org/jira/browse/CAMEL-24940
Project: Camel
Issue Type: Bug
Affects Versions: 4.22.1
Environment: Camel JBang (camel run) with --camel-version=4.18.0
(works) and 4.22.1 (broken). Linux, Java 21 (OpenJDK 21.0.12), running inside a
Kubernetes pod (in-cluster API at https://10.96.0.1:443/, namespace camel-dev)
with a service account permitted to read ConfigMaps.
Reporter: Michael Weiss
Autodetection of the Kubernetes property placeholder functions
(https://camel.apache.org/manual/property-placeholder-functions.html#_using_kubernetes_property_placeholder_functions)
no longer works in Camel 4.22.1. In 4.18.0 a route using \{{configmap:...}}
resolves the value from the ConfigMap without any explicit configuration; in
4.22.1 the placeholder is left unresolved and the literal "namespace/name/key"
string is used instead.
Reproducer (Camel JBang, YAML DSL, hello.camel.yaml):
- route:
id: route-6659
from:
id: from-3385
uri: timer
parameters:
period: "1000"
timerName: template
steps:
- setBody:
id: setBody-1700
expression:
constant: "\{{configmap:poll-enrich/file.txt}}"
- log:
id: log-1994
message: ${body}
Run inside a pod with a service account that can read ConfigMaps (namespace
camel-dev):
camel run hello.camel.yaml --max-messages=3 --camel-version=4.18.0
-> logs "Hello World" (the ConfigMap value), and startup logs
"he.camel.kubernetes.properties.BasePropertiesFunction : KubernetesClient using
masterUrl: https://10.96.0.1:443/ with namespace: camel-dev"
camel run hello.camel.yaml --max-messages=3 --camel-version=4.22.1
-> logs the literal "poll-enrich/file.txt" on every exchange; no
BasePropertiesFunction/KubernetesClient log line appears, i.e. the Kubernetes
properties function was never registered/autodetected.
Expected: \{{configmap:...}} / \{{secret:...}} placeholders keep working
without explicit configuration, as documented and as in 4.18.0.
Actual: the placeholder is not resolved; the raw "configmap:<name>/<key>"
argument is used as the property value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)