Skip to content

Commit e49720d

Browse files
swatisehgalAlexeyPerevalov
authored andcommitted
CRI update
1 parent 68e6a89 commit e49720d

File tree

1 file changed

+32
-11
lines changed

1 file changed

+32
-11
lines changed

keps/sig-node/20200619-provisioning-resources-with-numa-topology.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,33 @@ system allocatable resources.
8686

8787
### Design based on CRI
8888

89-
TODO here should be description of daemonset and how it
90-
interacts with container runtime daemon through CRI
89+
The containerStatusResponse returned as a response to the ContainerStatus rpc contains `Info` field which is used by the container runtime for capturing ContainerInfo.
90+
```go
91+
message ContainerStatusResponse {
92+
ContainerStatus status = 1;
93+
map<string, string> info = 2;
94+
}
95+
```
96+
97+
Containerd has been used as the container runtime in the initial investigation. The internal container object info
98+
[here](https://github.com/containerd/cri/blob/master/pkg/server/container_status.go#L130)
99+
100+
The Daemon set is responsible for the following:
101+
102+
- Parsing the info field to obtain container resource information
103+
- Identifying NUMA nodes of the allocated resources
104+
- Identifying total number of resources allocated on a NUMA node basis
105+
- Detecting Node resource capacity on a NUMA node basis
106+
- Updating the CRD instance per node indicating available resources on NUMA nodes, which is referred to the scheduler
107+
108+
109+
#### Drawbacks
110+
111+
The content of the `info` field is free form, unregulated by the API contract. So, CRI-compliant container runtime engines are not required to add any configuration-specific information, like for example cpu allocation, here. In case of containerd container runtime, the Linux Container Configuration is added in the `info` map depending on the verbosity setting of the container runtime engine.
112+
113+
There is currently work going on in the community as part of the the Vertical Pod Autoscaling feature to update the ContainerStatus field to report back containerResources
114+
[KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20191025-kubelet-container-resources-cri-api-changes.md).
91115

92-
collects resources consumed by pod's containers.
93-
And drawbacks of this approach related to information in non
94-
specific field
95116

96117
### Design based on podresources interface of the kubelet
97118

@@ -127,17 +148,17 @@ Available resources with topology of the node should be stored in CRD. Format of
127148
```go
128149
// NodeResourceTopology is a specification for a Foo resource
129150
type NodeResourceTopology struct {
130-
metav1.TypeMeta `json:",inline"`
131-
metav1.ObjectMeta `json:"metadata,omitempty"`
151+
metav1.TypeMeta `json:",inline"`
152+
metav1.ObjectMeta `json:"metadata,omitempty"`
132153

133-
TopologyPolicy string
134-
Nodes []NUMANodeResource `json:"nodes"`
154+
TopologyPolicy string
155+
Nodes []NUMANodeResource `json:"nodes"`
135156
}
136157

137158
// NUMANodeResource is the spec for a NodeResourceTopology resource
138159
type NUMANodeResource struct {
139-
NUMAID int
140-
Resources v1.ResourceList
160+
NUMAID int
161+
Resources v1.ResourceList
141162
}
142163
```
143164

0 commit comments

Comments
 (0)