Fix indentation in ConfigMap usage example (#3867)
* Fix indentation in ConfigMap usage example * Fix other example
This commit is contained in:
@@ -209,22 +209,22 @@ The `command` section references the `special.level` item stored in the ConfigMa
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: dapi-test-pod
|
name: dapi-test-pod
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: test-container
|
- name: test-container
|
||||||
image: gcr.io/google_containers/busybox
|
image: gcr.io/google_containers/busybox
|
||||||
command: [ "/bin/sh", "-c", "ls /etc/config/" ]
|
command: [ "/bin/sh", "-c", "ls /etc/config/" ]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/config
|
||||||
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /etc/config
|
configMap:
|
||||||
volumes:
|
# Provide the name of the ConfigMap containing the files you want
|
||||||
- name: config-volume
|
# to add to the container
|
||||||
configMap:
|
name: special-config
|
||||||
# Provide the name of the ConfigMap containing the files you want
|
restartPolicy: Never
|
||||||
# to add to the container
|
|
||||||
name: special-config
|
|
||||||
restartPolicy: Never
|
|
||||||
```
|
```
|
||||||
|
|
||||||
When the pod runs, the command (`"ls /etc/config/"`) produces the output below:
|
When the pod runs, the command (`"ls /etc/config/"`) produces the output below:
|
||||||
@@ -243,23 +243,23 @@ In this case, the `special.key` item will be mounted in the `config-volume` volu
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: dapi-test-pod
|
name: dapi-test-pod
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: test-container
|
- name: test-container
|
||||||
image: gcr.io/google_containers/busybox
|
image: gcr.io/google_containers/busybox
|
||||||
command: [ "/bin/sh","-c","cat /etc/config/keys/special.level" ]
|
command: [ "/bin/sh","-c","cat /etc/config/keys/special.level" ]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/config
|
||||||
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /etc/config
|
configMap:
|
||||||
volumes:
|
name: special-config
|
||||||
- name: config-volume
|
items:
|
||||||
configMap:
|
- key: special.level
|
||||||
name: special-config
|
path: /keys
|
||||||
items:
|
restartPolicy: Never
|
||||||
- key: special.level
|
|
||||||
path: /keys
|
|
||||||
restartPolicy: Never
|
|
||||||
```
|
```
|
||||||
|
|
||||||
When the pod runs, the command (`"cat /etc/config/keys/special.level"`) produces the output below:
|
When the pod runs, the command (`"cat /etc/config/keys/special.level"`) produces the output below:
|
||||||
|
|||||||
Reference in New Issue
Block a user