Skip to content

Commit 3159f89

Browse files
committed
DRA: "Structured Parameters" as base, "classic" DRA as extension
We decided to focus on structured parameters as the part of DRA which will get moved to beta first. "Classic" DRA (PodSchedulingContext, support for control plane controllers) will remain in alpha. It needs a separate feature gate. Therefore the description of DRA in the two KEPs gets shifted around such that the "structured parameters" KEP is a stand-alone, complete description of everything needed for using DRA like that. The original KEP is now an extension of that and describes PodSchedulingContext and the interaction with a DRA driver control plane controller. Immediate allocation is defined there because it does not make much sense for structured parameters. Mostly this was just a matter of copying text around and updating the wording. Changes that go beyond those editorial changes are: - title changes - new diagram for "structured parameters" - ResourceClass.StructuredParameters in 4381 became ResourceClass.ControlPlaneController in 3063 (different default, breaking change!) - new DRAControlPlaneController feature gate for everything in 3063 - removal of the kubelet v1alpha2 gRPC interface (kubernetes/kubernetes#124316). - updated description of ephemeral ResourceClaim namimg (did not match the current implementation with generated names) - added NodeListAndWatchResources kubelet gRPC call
1 parent 603a1f1 commit 3159f89

File tree

12 files changed

+2184
-2340
lines changed

12 files changed

+2184
-2340
lines changed

keps/sig-node/3063-dynamic-resource-allocation/README.md

Lines changed: 414 additions & 2157 deletions
Large diffs are not rendered by default.
0 Bytes
Loading

keps/sig-node/3063-dynamic-resource-allocation/components.puml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ component Kubernetes {
1111
component apiserver {
1212
file Pod
1313
file ResourceClaim
14-
file PodScheduling
14+
file PodSchedulingContext
1515
}
1616
component scheduler {
1717
component "resource plugin" as k8sresourceplugin
@@ -29,19 +29,19 @@ controllermanager -[hidden]> kubelet
2929
drivercontroller -[hidden]> driverplugin
3030

3131
Pod <. ResourceClaim: owned by\n(if created from template)
32-
Pod <. PodScheduling: owned by
32+
Pod <. PodSchedulingContext: owned by
3333

3434

3535
Pod -u-> k8sresourceclaimcontroller: read claim template\nfrom Pod spec
36-
ResourceClaim <-u- k8sresourceclaimcontroller: create claim,\nclean up users
36+
ResourceClaim <-u- k8sresourceclaimcontroller: create claim,\nclean up users,\ntrigger deallocation\n
3737
ResourceClaim <-u-> kubelet
38-
k8sresourceplugin <-u-> PodScheduling
38+
k8sresourceplugin <-u-> PodSchedulingContext
3939

4040
Pod <--> scheduler
4141
ResourceClaim <--> k8sresourceplugin
4242

4343
ResourceClaim <-> drivercontroller
4444
pluginmanager <-> driverplugin
4545
resourcemanager <-> driverplugin
46-
PodScheduling <-> drivercontroller
46+
PodSchedulingContext <-> drivercontroller
4747
@enduml

keps/sig-node/3063-dynamic-resource-allocation/kep.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ stage: alpha
2424
# The most recent milestone for which work toward delivery of this KEP has been
2525
# done. This can be the current (upcoming) milestone, if it is being actively
2626
# worked on.
27-
latest-milestone: "v1.30"
27+
latest-milestone: "v1.31"
2828

2929
# The milestone at which this feature was, or is targeted to be, at each stage.
3030
milestone:
@@ -37,6 +37,11 @@ feature-gates:
3737
- kube-controller-manager
3838
- kube-scheduler
3939
- kubelet
40+
- name: DRAControlPlaneController
41+
components:
42+
- kube-apiserver
43+
- kube-controller-manager
44+
- kube-scheduler
4045
disable-supported: true
4146

4247
metrics:
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright 2022 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
IMAGES += components.png kubelet.png
17+
18+
all: $(IMAGES)
19+
clean:
20+
rm -f $(IMAGES)
21+
22+
# We use the http://plantuml.com/plantuml server to generate
23+
# images. That way nothing needs to be installed besides Go.
24+
DOC_PLANTUML_GO = $(shell go env GOPATH)/bin/plantuml-go
25+
26+
%.png: %.puml $(DOC_PLANTUML_GO)
27+
$(DOC_PLANTUML_GO) -format png $<
28+
29+
%.svg: %.puml $(DOC_PLANTUML_GO)
30+
$(DOC_PLANTUML_GO) -format svg $<
31+
32+
# Builds the binary in GOPATH/bin. Changing into / first avoids
33+
# modifying the project's go.mod file.
34+
$(DOC_PLANTUML_GO):
35+
cd / && go get github.com/acarlson99/plantuml-go

keps/sig-node/4381-dra-structured-parameters/README.md

Lines changed: 1657 additions & 175 deletions
Large diffs are not rendered by default.
72.8 KB
Loading
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
@startuml
2+
!theme reddress-lightblue
3+
skinparam componentStyle rectangle
4+
left to right direction
5+
6+
cloud "resource driver" as resourcedriver {
7+
component "CRD controller" as drivercrdcontroller
8+
component "kubelet plugin" as driverplugin
9+
}
10+
11+
component Kubernetes {
12+
component apiserver {
13+
component namespaced {
14+
file ResourceClaimTemplate
15+
file Pod
16+
file ResourceClaim
17+
file DriverCRDParameters
18+
file ResourceClaimParameters
19+
}
20+
component "cluster-scoped" as clusterscoped {
21+
file ResourceClass
22+
file ResourceSlice
23+
}
24+
}
25+
component scheduler {
26+
component "resource plugin" as k8sresourceplugin
27+
}
28+
component "controller-manager" as controllermanager {
29+
component "resource claim controller" as k8sresourceclaimcontroller
30+
}
31+
component kubelet {
32+
component "plugin manager" as pluginmanager
33+
component "resource manager" as resourcemanager
34+
}
35+
}
36+
37+
' Kubernetes ---> resourcedriver
38+
39+
ResourceClaimTemplate <. Pod
40+
Pod <. ResourceClaim: owned by\n(if created from template)
41+
ResourceClaim .> ResourceClass
42+
ResourceClaim .> DriverCRDParameters
43+
ResourceClaimParameters .> DriverCRDParameters: generated from,\nowned by
44+
45+
Pod -u-> k8sresourceclaimcontroller
46+
ResourceClaimTemplate -u-> k8sresourceclaimcontroller
47+
ResourceClaim <-u- k8sresourceclaimcontroller: create claim,\nclean up consumers,\ntrigger deallocation
48+
k8sresourceplugin <- ResourceClaimParameters
49+
50+
Pod <--> kubelet
51+
Pod <--> scheduler
52+
ResourceClaim <--> k8sresourceplugin
53+
54+
ResourceClaimParameters <- drivercrdcontroller: create, update
55+
DriverCRDParameters ---> drivercrdcontroller: read
56+
resourcemanager <-> driverplugin: calls gRPC methods,\nreceives stream of\nresource information
57+
ResourceSlice-> k8sresourceplugin: consumes
58+
resourcemanager --> ResourceSlice: publishes
59+
pluginmanager <-> driverplugin: registers
60+
@enduml

keps/sig-node/4381-dra-structured-parameters/kep.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ stage: alpha
2525
# The most recent milestone for which work toward delivery of this KEP has been
2626
# done. This can be the current (upcoming) milestone, if it is being actively
2727
# worked on.
28-
latest-milestone: "v1.30"
28+
latest-milestone: "v1.31"
2929

3030
# The milestone at which this feature was, or is targeted to be, at each stage.
3131
milestone:
@@ -34,7 +34,12 @@ milestone:
3434
# The following PRR answers are required at alpha release
3535
# List the feature gate name and the components for which it must be enabled
3636
feature-gates:
37-
# DynamicResourceAllocation, same as for DRA without this KEP
37+
- name: DynamicResourceAllocation
38+
components:
39+
- kube-apiserver
40+
- kube-controller-manager
41+
- kube-scheduler
42+
- kubelet
3843
disable-supported: true
3944

4045
# The following PRR answers are required at beta release

0 commit comments

Comments
 (0)