Very similarly to the PeristentVolumeClaim action type, you can also mount Kubernetes ConfigMaps on container deploy actions using the configmap action type. (see here for the full reference).


kind: Deploy
type: configmap
name: my-configmap
  data: |
      some: data
      or: something

kind: Deploy
name: my-app
type: container
    - name: configuration
      containerPath: /config

      # The reference to the configmap Deploy

This mounts all the keys in the data field on the my-configmap action under the /config directory in the container. In this case, you'll find the file /config/ there, with the value above (some: data ...) as the file contents.

You can do the same for tests and tasks using the relative test spec.volumes and task spec.volumes fields. configmap volumes can of course also be referenced in kubernetes and helm actions, since they are deployed as standard ConfigMap resources.

Take a look at the action reference for more details.

Last updated