io.quarkus.vault.runtime.config.VaultRuntimeConfig.connectTimeout() " because "vaultRuntimeConfig" is null #46122
Replies: 8 comments 12 replies
-
/cc @geoand (kubernetes,openshift), @iocanel (kubernetes,openshift), @radcortez (config), @vsevel (vault) |
Beta Was this translation helpful? Give feedback.
-
how come your configuration is null? |
Beta Was this translation helpful? Give feedback.
-
you are probably moving from quarkus vault |
Beta Was this translation helpful? Give feedback.
-
Have you managed to solve this? We have the same. Interesting is that this property exists if you try to get through ConfigProvider.getConfig() |
Beta Was this translation helpful? Give feedback.
-
I experienced the same problem, but I wrote a @ApplicationScoped
public class VaultEngineAdapter {
@Inject
public VaultEngineAdapter(VaultKVSecretEngine kvSecretEngine,
VaultRuntimeConfig vaultRuntimeConfig, VaultConfigHolder vaultConfigHolder) {
this.kvSecretEngine = Objects.requireNonNull(kvSecretEngine);
this.vaultRuntimeConfig = vaultRuntimeConfig;
if (vaultConfigHolder.getVaultRuntimeConfig() == null) {
vaultConfigHolder.setVaultRuntimeConfig(vaultRuntimeConfig);
}
}
} Injects both the config and the holder (which is supposed to already have the config, but this is not the case (it is not assigned yet). After manually setting it, I can use the secret-engine normally on OpenShift. Problem does not occur in local development environment but only on OpenShift platform. The above workaround is not "pretty" but it overcomes the problem. |
Beta Was this translation helpful? Give feedback.
-
do you have a reoproducer? |
Beta Was this translation helpful? Give feedback.
-
I explored the significant updates in the latest Quarkus version (3.2.x to 3.15.x) concerning configuration circular dependencies, which guided my investigation. While debugging, I discovered that the “quarkus-vault” library was unable to fetch the correct configuration during application startup due to its predefined ordinal value (270). To address this, I switched from using “application.properties” and Kubernetes config maps to environment variables for supplying configurations. This adjustment effectively resolved the issue. |
Beta Was this translation helpful? Give feedback.
-
Configuration sources like Vault, Consul, Database, and others require configurations to be able to configure themselves (like URLs, passwords, etc). We call these ConfigurableConfigSources. These sources can be configured using the main sources: System Properties, Environment Variables, application.properties, and a few more (in reality, any source that does not depend on any other configuration). As you can imagine, it would be extremely complicated to allow any source to configure another, as this could also cause dependency cycles (imagine the Vault Config stored in the Database, the Database Config stored in Consul, and the Consul Config stored in Vault). If To conclude, configurations required by Vault, must be set in the main sources, listed here: https://quarkus.io/guides/config-reference#configuration-sources, or any other custom source that is not itself configurable. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Folks,
I am updating the quarkus bom version from 3.2.11.Final-redhat-00001 to 3.15.3.redhat-00002. But getting following Error while deploying using openshift:
Note: Also, with the quarkus version 3.2.11.Final-redhat-00001 We are using following vault configuration property:
Could anybody help with the above issue I am facing
Beta Was this translation helpful? Give feedback.
All reactions