Claus Ibsen created CAMEL-25418:
-----------------------------------

             Summary: camel-jbang - camel get vault does not list the 
Kubernetes config map names
                 Key: CAMEL-25418
                 URL: https://issues.apache.org/jira/browse/CAMEL-25418
             Project: Camel
          Issue Type: Bug
          Components: camel-jbang
            Reporter: Claus Ibsen


The {{kubernetes-configmaps}} developer console returns the config map names in 
its JSON under the key {{configmaps}}. It has used that key since the console 
was added (CAMEL-21497), and it still does after the typed response records of 
CAMEL-24565 ({{ConfigmapsDevConsole.Response.configmaps}}).

The readers look for {{configmap}} instead:
* 
{{dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListVault.java}}
 line 183: {{cmKubernetes.get("configmap")}}
* 
{{dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StatusParser.java}}
 line 1605: {{vo.get("configmap")}}

So {{camel get vault}} (and the vault status in the terminal UI) never lists 
the Kubernetes config map names, even when 
{{camel.vault.kubernetescm.configmaps}} is set.

h3. Fix
* Read {{configmaps}} in both places. Keep the console's key: it is part of the 
console's response contract (CAMEL-24565).
* Add a test that parses the console's JSON, so a mismatch between the console 
and its readers fails a build.

Found while reviewing CAMEL-25384 (https://github.com/apache/camel/pull/27493), 
which fixes the NPEs of the Kubernetes vault consoles when nothing is 
configured. Before that fix the configmaps console also listed the secrets 
names instead of the config map names.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to