bucharest-gold / entente

A place for open discussion of Node.js middleware at Red Hat, including ideas for projects, collaboration, etc.
Apache License 2.0
5 stars 4 forks source link

ConfigMap Booster #175

Closed lholmquist closed 7 years ago

lholmquist commented 7 years ago

similiar to https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-configmap and/or https://github.com/openshiftio-vertx-boosters/vertx-configmap-booster

lholmquist commented 7 years ago

Some notes:

config maps docs - https://docs.openshift.org/latest/dev_guide/configmaps.html

I found this node example on using configmaps, https://github.com/jorgemoralespou/ose-app-promotion-configmap/blob/master/node-app/server.js which is part of this blog post https://blog.openshift.com/configuring-your-application-part-1/

It looks like they do a combination of using the configMap as an ENV var and mounting it as a volume.

The swarm booster does the volume mount thing

The vertx booster actually just querys the Kubeneretes configmap endpoint to get the configmap data. Relevant java code: https://github.com/openshiftio-vertx-boosters/vertx-configmap-booster/blob/master/src/main/java/io/openshift/booster/HttpApplication.java#L115

https://github.com/vert-x3/vertx-config/blob/master/vertx-config-kubernetes-configmap/src/main/java/io/vertx/config/kubernetes/ConfigMapStore.java

The vert.x booster doesn't need to be restarted when a configMap changes, so maybe we should try doing it that way?

lholmquist commented 7 years ago

Repo started here: https://github.com/bucharest-gold/nodejs-configmap