Sha256: 4856b724ae9229dc9e9505c364968f2b8550abe1f7c5a09ac8f2c5ee79d3a563
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
Contents
--- title: Config Map Files nav_text: Config Map Files --- The `config_map_files` helper allows you to add config map data from a list of files. The files support layerying. ## Example Here's how to use it. .kubes/resources/shared/config_map.yaml ```yaml apiVersion: v1 kind: ConfigMap metadata: name: demo labels: app: demo data: <%= config_map_files %> ``` You can conveniently set multiple configmap values in files like so: .kubes/resources/shared/config_map/base.txt KEY1=cmvalue1 KEY2=cmvalue2 .kubes/resources/shared/config_map/dev.txt KEY2=cmvalue2-dev-override KEY3=cmvalue3 The resulting generated ConfigMap will be: ```yaml --- metadata: namespace: demo-dev labels: app: demo name: demo-928146dd24 apiVersion: v1 kind: ConfigMap data: KEY1: cmvalue1 KEY2: cmvalue2-dev-override KEY3: cmvalue3 ``` ## Layering Details Layering for Config Map Files and also supports app-scoped layers. Name | Example --- | --- configmap root | .kubes/resources/shared/config_map/{base,dev}.txt configmap app-scoped | .kubes/resources/shared/config_map/app1/{base,dev}.txt So if `KUBES_APP=app1`, then the app-scoped layer is also used. This handles the [Central Deployer Pattern]({% link _docs/patterns/central-deployer.md %}).
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kubes-0.8.5 | docs/_docs/helpers/builtin/config-map-files.md |
kubes-0.8.4 | docs/_docs/helpers/builtin/config-map-files.md |
kubes-0.8.3 | docs/_docs/helpers/builtin/config-map-files.md |