Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downward API implementation for resources limits and requests #24179

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 30 additions & 2 deletions api/swagger-spec/apps_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1709,8 +1709,7 @@
"id": "v1.DownwardAPIVolumeFile",
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
"path",
"fieldRef"
"path"
],
"properties": {
"path": {
Expand All @@ -1720,6 +1719,10 @@
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
}
}
},
Expand All @@ -1740,6 +1743,27 @@
}
}
},
"v1.ResourceFieldSelector": {
"id": "v1.ResourceFieldSelector",
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"required": [
"resource"
],
"properties": {
"containerName": {
"type": "string",
"description": "Container name: required for volumes, optional for env vars"
},
"resource": {
"type": "string",
"description": "Required: resource to select"
},
"divisor": {
"type": "string",
"description": "Specifies the output format of the exposed resources, defaults to \"1\""
}
}
},
"v1.FCVolumeSource": {
"id": "v1.FCVolumeSource",
"description": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.",
Expand Down Expand Up @@ -1982,6 +2006,10 @@
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod; only name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
Expand Down
32 changes: 30 additions & 2 deletions api/swagger-spec/batch_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1714,8 +1714,7 @@
"id": "v1.DownwardAPIVolumeFile",
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
"path",
"fieldRef"
"path"
],
"properties": {
"path": {
Expand All @@ -1725,6 +1724,10 @@
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
}
}
},
Expand All @@ -1745,6 +1748,27 @@
}
}
},
"v1.ResourceFieldSelector": {
"id": "v1.ResourceFieldSelector",
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"required": [
"resource"
],
"properties": {
"containerName": {
"type": "string",
"description": "Container name: required for volumes, optional for env vars"
},
"resource": {
"type": "string",
"description": "Required: resource to select"
},
"divisor": {
"type": "string",
"description": "Specifies the output format of the exposed resources, defaults to \"1\""
}
}
},
"v1.FCVolumeSource": {
"id": "v1.FCVolumeSource",
"description": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.",
Expand Down Expand Up @@ -1987,6 +2011,10 @@
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod; only name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
Expand Down
32 changes: 30 additions & 2 deletions api/swagger-spec/extensions_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7021,8 +7021,7 @@
"id": "v1.DownwardAPIVolumeFile",
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
"path",
"fieldRef"
"path"
],
"properties": {
"path": {
Expand All @@ -7032,6 +7031,10 @@
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
}
}
},
Expand All @@ -7052,6 +7055,27 @@
}
}
},
"v1.ResourceFieldSelector": {
"id": "v1.ResourceFieldSelector",
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"required": [
"resource"
],
"properties": {
"containerName": {
"type": "string",
"description": "Container name: required for volumes, optional for env vars"
},
"resource": {
"type": "string",
"description": "Required: resource to select"
},
"divisor": {
"type": "string",
"description": "Specifies the output format of the exposed resources, defaults to \"1\""
}
}
},
"v1.FCVolumeSource": {
"id": "v1.FCVolumeSource",
"description": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.",
Expand Down Expand Up @@ -7294,6 +7318,10 @@
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod; only name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
Expand Down
32 changes: 30 additions & 2 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -17105,8 +17105,7 @@
"id": "v1.DownwardAPIVolumeFile",
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
"path",
"fieldRef"
"path"
],
"properties": {
"path": {
Expand All @@ -17116,6 +17115,10 @@
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
}
}
},
Expand All @@ -17136,6 +17139,27 @@
}
}
},
"v1.ResourceFieldSelector": {
"id": "v1.ResourceFieldSelector",
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"required": [
"resource"
],
"properties": {
"containerName": {
"type": "string",
"description": "Container name: required for volumes, optional for env vars"
},
"resource": {
"type": "string",
"description": "Required: resource to select"
},
"divisor": {
"type": "string",
"description": "Specifies the output format of the exposed resources, defaults to \"1\""
}
}
},
"v1.ConfigMapVolumeSource": {
"id": "v1.ConfigMapVolumeSource",
"description": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.",
Expand Down Expand Up @@ -17309,6 +17333,10 @@
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod; only name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ResourceFieldSelector",
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
Expand Down
66 changes: 64 additions & 2 deletions docs/api-reference/batch/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2754,6 +2754,13 @@ <h3 id="_v1_envvarsource">v1.EnvVarSource</h3>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_resourcefieldselector">v1.ResourceFieldSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">configMapKeyRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects a key of a ConfigMap.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
Expand Down Expand Up @@ -3198,6 +3205,54 @@ <h3 id="_v1_volume">v1.Volume</h3>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_resourcefieldselector">v1.ResourceFieldSelector</h3>
<div class="paragraph">
<p>ResourceFieldSelector represents container resources (cpu, memory) and their output format</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">containerName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Container name: required for volumes, optional for env vars</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resource</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: resource to select</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">divisor</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the output format of the exposed resources, defaults to "1"</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_probe">v1.Probe</h3>
Expand Down Expand Up @@ -3546,10 +3601,17 @@ <h3 id="_v1_downwardapivolumefile">v1.DownwardAPIVolumeFile</h3>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">fieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_objectfieldselector">v1.ObjectFieldSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_resourcefieldselector">v1.ResourceFieldSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -4034,7 +4096,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-05-21 03:08:23 UTC
Last updated 2016-05-24 11:53:33 UTC
</div>
</div>
</body>
Expand Down