diff --git a/_topic_map.yml b/_topic_map.yml index 634597e311c2..4209f9828c84 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -643,9 +643,6 @@ Topics: - Name: Allocating Node Resources File: allocating_node_resources Distros: openshift-origin,openshift-enterprise,atomic-* -- Name: Opaque Integer Resources - File: opaque_integer_resources - Distros: openshift-origin,openshift-enterprise - Name: Node Problem Detector File: node_problem_detector Distros: openshift-origin,openshift-enterprise diff --git a/admin_guide/opaque_integer_resources.adoc b/admin_guide/opaque_integer_resources.adoc deleted file mode 100644 index 8f77afc2fa82..000000000000 --- a/admin_guide/opaque_integer_resources.adoc +++ /dev/null @@ -1,143 +0,0 @@ -[[admin-guide-opaque-resources]] -= Opaque Integer Resources -{product-author} -{product-version} -:data-uri: -:icons: -:experimental: -:toc: macro -:toc-title: -:prewrap!: - -toc::[] - -== Overview -//tag::oir-intro[] -Opaque integer resources allow cluster operators to provide new node-level -resources that would be otherwise unknown to the system. Users can consume these -resources in pod specifications, similar to CPU and memory. The scheduler performs -resource accounting so that no more than the available amount is -simultaneously allocated to pods. - -[NOTE] -==== -Opaque integer resources are Alpha currently, and only resource accounting is -implemented. There is no resource quota or limit range support for these -resources, and they have no impact on QoS. -==== - -Opaque integer resources are called _opaque_ because {product-title} -does not know what the resource is, but will schedule a pod on a node -only if enough of that resource is available. They are called _integer resources_ -because they must be available, or _advertised_, in integer amounts. The API server -restricts quantities of these resources to whole numbers. Examples of -_valid_ quantities are `3`, `3000m`, and `3Ki`. -//end::oir-intro[] - -Opaque integer resources can be used to allocate: - -* Last-level cache (LLC) -* Graphics processing unit (GPU) devices -* Field-programmable gate array (FPGA) devices -* Slots for sharing bandwidth to a parallel file system. -// https://github.com/kubernetes/kubernetes/issues/28312 - -For example, if a node has 800 GiB of a special kind of disk storage, you could create a name for the special storage, -such as `_opaque-int-resource-special-storage_`. You could advertise it in chunks of a certain size, -such as 100 GiB. In that case, your node would advertise that it has eight resources of type `opaque-int-resource-special-storage`. - -Opaque integer resource names must begin with the prefix `pod.alpha.kubernetes.io/opaque-int-resource-`. - -== Creating Opaque Integer Resources - -There are two steps required to use opaque integer resources. First, the cluster -operator must name and advertise a per-node opaque resource on one or more nodes. Second, -application developer must request the opaque resource in pods. - -To make opaque integer resources available: - -. Allocate the resource and assign a name starting with `pod.alpha.kubernetes.io/opaque-int-resource-` - -. Advertise a new opaque integer resource by submitting -a PATCH HTTP request to the API server that specifies the available -quantity in the `status.capacity` for a node in the cluster. -+ -For example, the following HTTP request advertises five `foo` resources on the -`openshift-node-1` node. -+ -[options="nowrap"] ----- -PATCH /api/v1/nodes/openshift-node-1/status HTTP/1.1 -Accept: application/json -Content-Type: application/json-patch+json -Host: openshift-master:8080 - -[ - { - "op": "add", - "path": "/status/capacity/pod.alpha.kubernetes.io~1opaque-int-resource-foo", - "value": "5" - } -] ----- -+ -[NOTE] -==== -The `~1` in the `path` is the encoding for the character `/`. -The operation path value in the JSON-Patch is interpreted as a -JSON-Pointer. For more details, refer to -link:https://tools.ietf.org/html/rfc6901#section-3[IETF RFC 6901, section 3]. -==== -+ -After this operation, the node `status.capacity` includes a new resource. The -`status.allocatable` field is updated automatically with the new resource -asynchronously. -+ -[NOTE] -==== -Since the scheduler uses the node `status.allocatable` value when evaluating pod -fitness, there might be a short delay between patching the node capacity with a -new resource and the first pod that requests the resource to be scheduled on -that node. -==== - -The application developer can then consume the opaque resources by editing the pod config to -include the name of the opaque resource as a key in the `spec.containers[].resources.requests` field. - -//tag::oir-step[] -For example: The following pod requests two CPUs and one `foo` (an opaque resource). - -[source,yaml,options="nowrap"] ----- -apiVersion: v1 -kind: Pod -metadata: - name: my-pod -spec: - containers: - - name: my-container - image: myimage - resources: - requests: - cpu: 2 - pod.alpha.kubernetes.io/opaque-int-resource-foo: 1 ----- - -The pod will be scheduled only if all of the resource requests are satisfied -(including CPU, memory, and any opaque resources). The pod will remain in the -`PENDING` state while the resource request cannot be met by any node. - -[options="nowrap"] ----- -Conditions: - Type Status - PodScheduled False -... -Events: - FirstSeen LastSeen Count From SubObjectPath Type Reason Message - --------- -------- ----- ---- ------------- -------- ------ ------- - 14s 0s 6 default-scheduler Warning FailedScheduling No nodes are available that match all of the following predicates:: Insufficient pod.alpha.kubernetes.io/opaque-int-resource-foo (1). ----- -//end::oir-step[] - -This information can also be found in the Developer Guide under xref:../dev_guide/compute_resources.adoc#opaque-integer-resources-dev[Quotas and Limit Ranges]. diff --git a/dev_guide/compute_resources.adoc b/dev_guide/compute_resources.adoc index 1f7b87ca3d4e..df0b2660a8ac 100644 --- a/dev_guide/compute_resources.adoc +++ b/dev_guide/compute_resources.adoc @@ -351,22 +351,6 @@ $ oc run ruby-hello-world --image=ruby-hello-world --limits=memory=400Mi ---- endif::[] - -ifdef::openshift-origin,openshift-enterprise[] -[[opaque-integer-resources-dev]] -=== Opaque Integer Resources - -include::admin_guide/opaque_integer_resources.adoc[tag=oir-intro] - -The cluster administrator is usually responsible for creating the resources and making them available. -For more information on creating opaque integer resources, see xref:../admin_guide/opaque_integer_resources.adoc#admin-guide-opaque-resources[Opaque Integer Resources] in the Administrator Guide. - -To consume an opaque integer resource in a pod, edit the pod to -include the name of the opaque resource as a key in the `spec.containers[].resources.requests` field. - -include::admin_guide/opaque_integer_resources.adoc[tag=oir-step] -endif::[] - ifdef::openshift-enterprise,openshift-dedicated,openshift-aro,openshift-origin[] == Project Resource Limits