ConfigStoreOptions kubeConfig = new ConfigStoreOptions()
.setType(CONFIGMAP)
.setFormat(HOCON)
.setConfig(new JsonObject()
.put(OPTIONAL, true)
.put("name", "application.properties"));
ConfigRetrieverOptions configRetrieverOptions = new ConfigRetrieverOptions()
.addStore(kubeConfig); // Values here will override identical keys from above
ConfigRetriever retriever = ConfigRetriever.create(vertx, configRetrieverOptions);
retriever.getConfig(res -> {
if (res.succeeded()) {
LOG.log(WARNING, res.result().encodePrettily());
// Do Other Stuff
startFuture.complete();
} else {
LOG.log(SEVERE, "Error loading config");
startFuture.fail(res.cause());
}
});
SEVERE: Error loading config
java.lang.NoClassDefFoundError: Could not initialize class io.fabric8.kubernetes.client.Config
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:16)
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:13)
at io.vertx.config.kubernetes.ConfigMapStore.lambda$getClient$0(ConfigMapStore.java:80)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:271)
at io.vertx.core.impl.TaskQueue.lambda$new$0(TaskQueue.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Jul 23, 2017 12:40:11 PM io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer
SEVERE: Failed in deploying verticle
java.lang.NoClassDefFoundError: Could not initialize class io.fabric8.kubernetes.client.Config
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:16)
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:13)
at io.vertx.config.kubernetes.ConfigMapStore.lambda$getClient$0(ConfigMapStore.java:80)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:271)
at io.vertx.core.impl.TaskQueue.lambda$new$0(TaskQueue.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
java.lang.NoClassDefFoundError: Could not initialize class io.fabric8.kubernetes.client.Config
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:16)
at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:13)
at io.vertx.config.kubernetes.ConfigMapStore.lambda$getClient$0(ConfigMapStore.java:80)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:271)
at io.vertx.core.impl.TaskQueue.lambda$new$0(TaskQueue.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/815b5f77-00e5-4b3c-88b1-0408334053a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
WARNING: Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 10290 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
at io.vertx.core.impl.BlockedThreadChecker.registerThread(BlockedThreadChecker.java:67)
at io.vertx.core.impl.VertxThreadFactory.newThread(VertxThreadFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:612)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:925)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1357)
at io.vertx.core.impl.TaskQueue.execute(TaskQueue.java:78)
at io.vertx.core.impl.ContextImpl.executeBlocking(ContextImpl.java:291)
at io.vertx.core.impl.ContextImpl.executeBlocking(ContextImpl.java:240)
at io.vertx.core.impl.VertxImpl.executeBlocking(VertxImpl.java:650)
at io.vertx.core.impl.VertxImpl.executeBlocking(VertxImpl.java:656)
at io.vertx.config.kubernetes.ConfigMapStore.getClient(ConfigMapStore.java:74)
at io.vertx.config.kubernetes.ConfigMapStore.get(ConfigMapStore.java:105)
at io.vertx.config.impl.ConfigurationProvider.get(ConfigurationProvider.java:35)
at io.vertx.config.impl.ConfigRetrieverImpl.lambda$compute$8(ConfigRetrieverImpl.java:167)
at io.vertx.config.impl.ConfigRetrieverImpl$$Lambda$32/648252746.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at io.vertx.config.impl.ConfigRetrieverImpl.compute(ConfigRetrieverImpl.java:176)
at io.vertx.config.impl.ConfigRetrieverImpl.getConfig(ConfigRetrieverImpl.java:98)
at io.vertx.config.impl.ConfigRetrieverImpl.<init>(ConfigRetrieverImpl.java:82)
at io.vertx.config.ConfigRetriever.create(ConfigRetriever.java:32)
at com.redhat.labs.ocp.MainVerticle.start(MainVerticle.java:45)
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$8(DeploymentManager.java:434)
at io.vertx.core.impl.DeploymentManager$$Lambda$26/1932831450.handle(Unknown Source)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
at io.vertx.core.impl.ContextImpl$$Lambda$27/440737101.run(Unknown Source)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:748)
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/7177f665-ca0f-4aa4-8779-286864ace4ff%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/a0a03fd0-c561-4904-b7c5-db45643d2139%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/a0a03fd0-c561-4904-b7c5-db45643d2139%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/LZi9JjgCStc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/FC0AE090-FA5C-499A-8019-05ABD9EB9B28%40gmail.com.
------
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/CAGFbfuw9g8tc80savH5ZTaZ-MyBEMPjMUqo%3D7pWDMqGH%2BFg3%2Bw%40mail.gmail.com.
Hi,Generally you can’t read secrets without very specific permissions (I need to re-discover them and document them). So, to read secrets I still recommend using ENV Var. Here is an example:In fact in the case of secrets the need to hot reload is less prominent I would say. Because they require coordination between the client and the system being protected.Clement
On 24 Jul 2017, at 19:08, Deven Phillips <deven.p...@redhat.com> wrote:
Clement,I got the configmap working for a JSON literal, but I am getting a Forbidden error for a set of secrets for our PostgreSQL DB... Is there something special we need to do there to make that work?Thanks in advance!Deven
Updates are not a concern because we would be deploying a new image in that case.Thanks,Deven
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/CAGFbfuw9g8tc80savH5ZTaZ-MyBEMPjMUqo%3D7pWDMqGH%2BFg3%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/LZi9JjgCStc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/8C03D851-38AD-43AA-A565-40BB958BDD32%40gmail.com.