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

KEP-3063: dynamic resource allocation #3064

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions keps/prod-readiness/sig-node/3063.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The KEP must have an approver from the
# "prod-readiness-approvers" group
# of http://git.k8s.io/enhancements/OWNERS_ALIASES
kep-number: 3063
alpha:
approver: "@johnbelamaric"
pohly marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 20 additions & 0 deletions keps/sig-node/3063-dynamic-resource-allocation/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
IMAGES += components.png kubelet.png

all: $(IMAGES)
clean:
rm -f $(IMAGES)

# We use the http://plantuml.com/plantuml server to generate
# images. That way nothing needs to be installed besides Go.
DOC_PLANTUML_GO = $(shell go env GOPATH)/bin/plantuml-go

%.png: %.puml $(DOC_PLANTUML_GO)
$(DOC_PLANTUML_GO) -format png $<

%.svg: %.puml $(DOC_PLANTUML_GO)
$(DOC_PLANTUML_GO) -format svg $<

# Builds the binary in GOPATH/bin. Changing into / first avoids
# modifying the project's go.mod file.
$(DOC_PLANTUML_GO):
cd / && go get github.com/acarlson99/plantuml-go
2,469 changes: 2,469 additions & 0 deletions keps/sig-node/3063-dynamic-resource-allocation/README.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions keps/sig-node/3063-dynamic-resource-allocation/components.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@startuml
!theme reddress-lightblue
skinparam componentStyle rectangle

cloud "resource driver" {
component "resource driver controller" as drivercontroller
component "resource kubelet plugin" as driverplugin
}

component Kubernetes {
component apiserver {
file Pod
file ResourceClaim
file PodScheduling
}
component scheduler {
component "resource plugin" as k8sresourceplugin
}
component "controller-manager" as controllermanager {
component "resource claim controller" as k8sresourceclaimcontroller
}
component kubelet {
component "plugin manager" as pluginmanager
component "resource manager" as resourcemanager
}
}

controllermanager -[hidden]> kubelet
drivercontroller -[hidden]> driverplugin

Pod <. ResourceClaim: owned by\n(if created from template)
Pod <. PodScheduling: owned by


Pod -u-> k8sresourceclaimcontroller: read claim template\nfrom Pod spec
ResourceClaim <-u- k8sresourceclaimcontroller: create claim,\nclean up users
ResourceClaim <-u-> kubelet
k8sresourceplugin <-u-> PodScheduling

Pod <--> scheduler
ResourceClaim <--> k8sresourceplugin

ResourceClaim <-> drivercontroller
pluginmanager <-> driverplugin
resourcemanager <-> driverplugin
PodScheduling <-> drivercontroller
@enduml
46 changes: 46 additions & 0 deletions keps/sig-node/3063-dynamic-resource-allocation/kep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
title: dynamic resource allocation
kep-number: 3063
authors:
- "@pohly"
owning-sig: sig-node
participating-sigs:
- sig-scheduling
status: provisional
creation-date: 2021-05-17
reviewers:
- "@ahg-g"
ahg-g marked this conversation as resolved.
Show resolved Hide resolved
- "@alculquicondor"
- "@klueska"
approvers:
- "@sig-node-leads"

see-also:
replaces:

# The target maturity stage in the current dev cycle for this KEP.
stage: alpha

# The most recent milestone for which work toward delivery of this KEP has been
# done. This can be the current (upcoming) milestone, if it is being actively
# worked on.
latest-milestone: "v1.25"

# The milestone at which this feature was, or is targeted to be, at each stage.
milestone:
alpha: "v1.25"
beta: "v1.27"
stable: "v1.29"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set these already?

Copy link
Contributor Author

@pohly pohly Jun 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It documents the intend, but I can also take it out. I'm not sure what the guidance is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it says right above it "or is targeted to be" - so setting some future goals seems fine (although of course potentially to ambitious, but that's a different question).


feature-gates:
- name: DynamicResourceAllocation
components:
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- kubelet
disable-supported: true

metrics:
- resource_controller_create_total
- resource_controller_create_failures_total
- resource controller workqueue with name="resource_claim"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions keps/sig-node/3063-dynamic-resource-allocation/kubelet.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@startuml
!theme reddress-lightblue

(*) --> "Pod scheduled to the node"
-->[ **Kubelet** pick up the pod ] "Pod references resource claim"
-->[ **Kubelet** calls NodePrepareResource(ResourceClaimUID, AllocationParameters)\l **Resource Plugin** creates CDI JSON file(s) ] "CDI JSON files created"
-->[ **Resource Plugin** returns device Ids ] "Resource prepared"
-->[ **Kubelet** passes device Ids to the CRI runtime\l **CRI runtime** uses CDI JSON file(s) to update OCI container config\l **CRI runtime** creates pod containers ] "All Pod containers created"
-->[ ... ] "Pod runs"
-->[ ... ] "Pod terminated"
-->[ **Kubelet** calls NodeUnprepareResource\l **Resource plugin** removes CDI JSON file(s) ] (*)
@enduml