Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Init Image with Templates

The init container processes a set of configuration templates with values coming from a ConfigMap. The processed templates are written out into a directory. The Docker build in init-container is based on k8spatterns/gomplate and has the following input parameters:

  • Templates are taken from the /in directory. Currently, only standalone.xml is parameterized to tune the log output format.

  • The templates' values to be filled in are taken from the /params directory, where the config map is volume mounted. Each file in this directory is taken as a gomplate --datasource, with the name being the file’s basename.

  • The output is written to /out, which should be a shared volume mounted both from the init container and the Wildfly server container

To summarize: This image contains the templates in its /in directory, and the template processor gomplate takes parameters from /params and writes the processed templates to /out. The content of the latter two directories must be provided from the outside; in a Kubernetes environment, these are Pod volumes.

You can recreate the image with the script build.sh, but we already pushed the latest image to Docker Hub, so you don’t have to do this.

If you rebuild it independently, please remember that the image must be reachable for the Kubernetes cluster. So you would either need to push it to a registry (and adapt the names before doing this) or when using minikube build against the minikube Docker daemon (eval $(minikube docker-env)).