Skip to content

configMaps

Feature state: 0.8.0

configMaps value in Kubedeploy allow for deploying multiple custom configMaps objects.

It is also possible to automatically mount ConfigMaps in all containers of a Pod by definig custom mount parametars. (Feature state: 1.0.0)

Note

By default configMaps in Kubedeploy will not deploy any ConfigMap objects.

However, when defining them under this value, chart will automatically prepend kubedeploy.fullname to any defined configmap object to prevent collisions with other releases.

Define custom configMaps

values.yaml
nameOverride: my-app
image:
  repository: nginx
  tag: latest

configMaps:
  - name: configmap1
    mount: True # (optional) Should this configmap be mounted as volume in containers?
    mountPath: /data/confmap # (required if mount=True) Define mount path for this configmap
    data:
      kubedeploy.txt: |+
        configmap values

  - name: configmap2
    data:
      config: |+
        config2
Deploy command
helm install webapp sysbee/kubedeploy -f values.yaml

As a result of the above example, Kubdeploy will create two extra ConfigMap objects named: webapp-my-app-configmap1 and webapp-my-app-configmap2.

First configmap will also be mounted inside all of the Pod's containers at /data/configmap path exposing kubedeploy.txt as file on /data/configmap/kubedeploy.txt.

Tip

Common usecase in the above scenario would be creating and automatically mounting any configuration files your application might need during its runtime.

See also: