Merge pull request #32236 from tengqm/zh-config-cfgmap

[zh] Update configure pod configmap
This commit is contained in:
Kubernetes Prow Robot
2022-03-26 00:41:20 -07:00
committed by GitHub
3 changed files with 115 additions and 80 deletions
@@ -13,7 +13,6 @@ spec:
volumes:
- name: config-volume
configMap:
# Provide the name of the ConfigMap containing the files you want
# to add to the container
# 提供包含要添加到容器中的文件的 ConfigMap 的名称
name: special-config
restartPolicy: Never
@@ -8,12 +8,12 @@ spec:
image: k8s.gcr.io/busybox
command: [ "/bin/sh", "-c", "env" ]
env:
# Define the environment variable
# 定义环境变量
- name: SPECIAL_LEVEL_KEY
valueFrom:
configMapKeyRef:
# The ConfigMap containing the value you want to assign to SPECIAL_LEVEL_KEY
# ConfigMap 包含你要赋给 SPECIAL_LEVEL_KEY 的值
name: special-config
# Specify the key associated with the value
# 指定与取值相关的键名
key: special.how
restartPolicy: Never