Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secrets must be configured on Kubernetes vault configuration #1457

Open
mweissdigchg opened this issue Nov 21, 2024 · 5 comments
Open

Secrets must be configured on Kubernetes vault configuration #1457

mweissdigchg opened this issue Nov 21, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mweissdigchg
Copy link

mweissdigchg commented Nov 21, 2024

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.0 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. Add camel-kubernetes to camel.jbang.dependencies, because of this bug (fixed in 4.8.1)
  6. 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.0

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
@mweissdigchg mweissdigchg added the bug Something isn't working label Nov 21, 2024
@mgubaidullin
Copy link
Contributor

  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
Copy link

mueckinger commented Nov 22, 2024

  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
Copy link
Contributor

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
Copy link

mueckinger commented Nov 22, 2024

Downgraded to 4.8.0 and now it builds the image.
But now the property placeholder e.g. {{secret:db/password}} does not provide a value.
Adding camel-kubernetes as described in https://issues.apache.org/jira/browse/CAMEL-21316 brings back the error Secrets must be configured on Kubernetes vault configuration.
Adding camel.vault.kubernetes.refreshEnabled=false as described in https://issues.apache.org/jira/browse/CAMEL-21445 doesn't make any difference

@davsclaus
Copy link
Contributor

try with 4.8.2 camel release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants