Update downward-api-volume-expose-pod-information.md (#9567)

dapi-volume-resources.yaml
Added divisor field in resourceFieldRef for DownwardAPIVolumeFiles
to clarify the format in which values are returned.

Issue: https://github.com/kubernetes/kubernetes/issues/64579
pull/9686/head
Khurram 2018-07-31 17:04:38 +05:30 committed by k8s-ci-robot
parent 8f0753eb58
commit 66894191f1
2 changed files with 7 additions and 2 deletions

View File

@ -165,8 +165,9 @@ Look at the `items` array under `downwardAPI`. Each element of the array is a
DownwardAPIVolumeFile.
The first element specifies that in the Container named `client-container`,
the value of the `limits.cpu` field
should be stored in a file named `cpu_limit`.
the value of the `limits.cpu` field in the format specified by `1m` should be
stored in a file named `cpu_limit`. The `divisor` field is optional and has the
default value of `1` which means cores for cpu and bytes for memory.
Create the Pod:

View File

@ -39,16 +39,20 @@ spec:
resourceFieldRef:
containerName: client-container
resource: limits.cpu
divisor: 1m
- path: "cpu_request"
resourceFieldRef:
containerName: client-container
resource: requests.cpu
divisor: 1m
- path: "mem_limit"
resourceFieldRef:
containerName: client-container
resource: limits.memory
divisor: 1Mi
- path: "mem_request"
resourceFieldRef:
containerName: client-container
resource: requests.memory
divisor: 1Mi