Skip to content

Commit

Permalink
Update downward-api-volume-expose-pod-information.md (#9567)
Browse files Browse the repository at this point in the history
dapi-volume-resources.yaml
Added divisor field in resourceFieldRef for DownwardAPIVolumeFiles
to clarify the format in which values are returned.

Issue: kubernetes/kubernetes#64579
  • Loading branch information
khrm authored and k8s-ci-robot committed Jul 31, 2018
1 parent 8f0753e commit 6689419
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 4 additions & 0 deletions content/en/examples/pods/inject/dapi-volume-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6689419

Please sign in to comment.