mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-09-15 12:18:57 +00:00
configMapGenerator docs content addition
This commit is contained in:
@@ -9,9 +9,11 @@ description: >
|
||||
Each entry in this list results in the creation of
|
||||
one ConfigMap resource (it's a generator of n maps).
|
||||
|
||||
The example below creates three ConfigMaps. One with the names and contents of
|
||||
the given files, one with key/value as data, and a third which sets an
|
||||
annotation and label via `options` for that single ConfigMap.
|
||||
The example below creates four ConfigMaps:
|
||||
- first, with the names and contents of the given files
|
||||
- second, with key/value as data using key/value pairs from files
|
||||
- third, also with key/value as data, directly specified using `literals`
|
||||
- and a fourth, which sets an annotation and label via `options` for that single ConfigMap
|
||||
|
||||
Each configMapGenerator item accepts a parameter of
|
||||
`behavior: [create|replace|merge]`.
|
||||
@@ -46,8 +48,12 @@ configMapGenerator:
|
||||
files:
|
||||
- application.properties
|
||||
- more.properties
|
||||
- name: my-java-server-env-file-vars
|
||||
envs:
|
||||
- my-server-env.properties
|
||||
- more-server-props.env
|
||||
- name: my-java-server-env-vars
|
||||
literals:
|
||||
literals:
|
||||
- JAVA_HOME=/opt/java/jdk
|
||||
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
||||
options:
|
||||
|
||||
@@ -8,7 +8,11 @@ description: >
|
||||
|
||||
列表中的每个条目都将生成一个 ConfigMap (合计可以生成 n 个 ConfigMap)。
|
||||
|
||||
下面的示例会生成 3 个ConfigMap:第一个带有给定文件的名称和内容,第二个将在 data 中添加 key/value,第三个通过 `options` 为单个 ConfigMap 设置注释和标签。
|
||||
以下示例创建四个 ConfigMap:
|
||||
- 第一个使用给定文件的名称和内容创建数据
|
||||
- 第二个使用文件中的键/值对将数据创建为键/值
|
||||
- 第三个使用 `literals` 中的键/值对创建数据作为键/值
|
||||
- 第四个通过 `options` 设置单个 ConfigMap 的注释和标签
|
||||
|
||||
每个 configMapGenerator 项均接受的参数 `behavior: [create|replace|merge]`,这个参数允许修改或替换父级现有的 configMap。
|
||||
|
||||
@@ -31,8 +35,12 @@ configMapGenerator:
|
||||
files:
|
||||
- application.properties
|
||||
- more.properties
|
||||
- name: my-java-server-env-file-vars
|
||||
envs:
|
||||
- my-server-env.properties
|
||||
- more-server-props.env
|
||||
- name: my-java-server-env-vars
|
||||
literals:
|
||||
literals:
|
||||
- JAVA_HOME=/opt/java/jdk
|
||||
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
||||
options:
|
||||
|
||||
Reference in New Issue
Block a user