apache / camel-karavan

Apache Camel Karavan a Low-code Data Integration Platform
https://camel.apache.org
Apache License 2.0
454 stars 157 forks source link

Secrets must be configured on Kubernetes vault configuration #1457

Closed mweissdigchg closed 41 minutes ago

mweissdigchg commented 1 day ago

Describe the bug

When using Kubernetes Secret it runs in dev-mode but build fails with message: "Secrets must be configured on Kubernetes vault configuration"

Steps to reproduce the behavior

  1. Create deployment with ghcr.io/apache/camel-karavan:4.8.1 in Kubernetes
  2. Create a Kubernetes Secret in the same namespace
  3. Refer to it in a route with {{secret:db/password}}
  4. Run Dev mode --> runs and can access password
  5. Build container --> build fails with 'Secrets must be configured on Kubernetes vault configuration'

Variant

Web Application

Container Management (if applicable)

Kubernetes

Operating System (if applicable)

Linux

Version

4.8.1

Relevant log output

Cloning into '/karavan/code'...
java.lang.IllegalArgumentException: Secrets must be configured on Kubernetes vault configuration
    at org.apache.camel.component.kubernetes.secrets.vault.SecretsReloadTriggerTask.doStart(SecretsReloadTriggerTask.java:96)
    at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
    at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:126)
    at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
    at org.apache.camel.impl.engine.DefaultPeriodTaskScheduler$TaskWrapper.doStart(DefaultPeriodTaskScheduler.java:105)
    at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
    at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:126)
    at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
    at org.apache.camel.support.TimerListenerManager.addTimerListener(TimerListenerManager.java:117)
    at org.apache.camel.impl.engine.DefaultPeriodTaskScheduler.addTimerListener(DefaultPeriodTaskScheduler.java:63)
    at org.apache.camel.impl.engine.DefaultPeriodTaskScheduler.scheduledTask(DefaultPeriodTaskScheduler.java:43)
    at org.apache.camel.main.DefaultConfigurationConfigurer.configureVault(DefaultConfigurationConfigurer.java:709)
    at org.apache.camel.main.DefaultConfigurationConfigurer.afterConfigure(DefaultConfigurationConfigurer.java:618)
    at org.apache.camel.main.BaseMainSupport.doConfigureCamelContextFromMainConfiguration(BaseMainSupport.java:1015)
    at org.apache.camel.main.BaseMainSupport.autoconfigure(BaseMainSupport.java:548)
    at org.apache.camel.main.MainSupport.autoconfigure(MainSupport.java:73)
    at org.apache.camel.main.KameletMain.autoconfigure(KameletMain.java:716)
    at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:779)
    at org.apache.camel.main.MainSupport.initCamelContext(MainSupport.java:339)
    at org.apache.camel.main.KameletMain.doInit(KameletMain.java:362)
    at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
    at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
    at org.apache.camel.dsl.jbang.core.commands.Run.runKameletMain(Run.java:1340)
    at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:864)
    at org.apache.camel.dsl.jbang.core.commands.Run.runExport(Run.java:330)
    at org.apache.camel.dsl.jbang.core.commands.ExportBaseCommand.runSilently(ExportBaseCommand.java:318)
    at org.apache.camel.dsl.jbang.core.commands.ExportCamelMain.export(ExportCamelMain.java:68)
    at org.apache.camel.dsl.jbang.core.commands.Export.export(Export.java:150)
    at org.apache.camel.dsl.jbang.core.commands.Export.export(Export.java:66)
    at org.apache.camel.dsl.jbang.core.commands.ExportBaseCommand.doCall(ExportBaseCommand.java:248)
    at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:71)
    at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:37)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
    at picocli.CommandLine.execute(CommandLine.java:2174)
    at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:173)
    at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:62)
    at main.CamelJBang.main(CamelJBang.java:36)
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.063 s
[INFO] Finished at: 2024-11-21T13:49:58Z
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/karavan/code/demo-energy). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
mgubaidullin commented 1 day ago
  1. Latest Karavan release is 4.8.0. Releases
  2. Bug are related to https://issues.apache.org/jira/browse/CAMEL-21316, https://issues.apache.org/jira/browse/CAMEL-21436
mueckinger commented 1 hour ago
  1. Latest Karavan release is 4.8.0. Releases

I know this is off topic, but I came to this via the Installation instructions via main Readme?

Steps to reproduce:

  1. Visit https://github.com/apache/camel-karavan
  2. Click Documentation / How to install on / Kubernetes
  3. Follow Download karavan-kubernetes folder --> will install 4.8.1
mgubaidullin commented 59 minutes ago

The main branch reflects the latest work-in-progress code, including its corresponding README and resources. For stable versions, each release has a dedicated tag in the git repository, along with its specific README and deployment resources. Please use the release tags for stable versions and documentation.

mueckinger commented 49 minutes ago

Downgraded to 4.8.0 and now it builds the image. Thank you!