File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,33 @@ def config_mariadb():
337337Using this final configuration, Juju creates a Kubernetes pod for each
338338application unit.
339339
340+ # ### Unit pod ConfigMaps
341+
342+ A Kubernetes [ConfigMap][upstream-kubernetes-configmap] "allows you to decouple
343+ configuration artifacts from image content to keep containerized applications
344+ portable".
345+
346+ A ConfigMap is set up within the final pod configuration file by specifying a
347+ file set that is mounted within the Docker image. Juju internally creates a
348+ " config-map" volume source to do that. Its name is based on the charm name, the
349+ fileset name, and the string '-config' : ` <appname>-<filesetname>-config`
350+
351+ For instance, the 'myapp' charm may produce a pod configuration file
352+ containing :
353+
354+ ` ` ` yaml
355+ files:
356+ - name: foocfg
357+ mountPath: /var/lib/foo
358+ files:
359+ file1: |
360+ [config]
361+ foo: bar
362+ ` ` `
363+
364+ This would yield a config map called `myapp-foocfg-config` created to back the
365+ volume mounted into the pod.
366+
340367# # Charm Store
341368
342369Push the built charm to the Charm Store :
@@ -447,3 +474,4 @@ Also consider the following tutorials:
447474[github-wallyworld-mariadb] : https://github.com/wallyworld/caas/tree/master/charms/mariadb
448475[github-layer-index] : https://github.com/juju/layer-index
449476[charms-reactive] : https://charmsreactive.readthedocs.io/en/latest/index.html
477+ [upstream-kubernetes-configmap] : https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
You can’t perform that action at this time.
0 commit comments