Skip to content

Commit

Permalink
Merge pull request #3064 from pohly/dynamic-resource-allocation-upstream
Browse files Browse the repository at this point in the history
KEP-3063: dynamic resource allocation
  • Loading branch information
k8s-ci-robot committed Jun 23, 2022
2 parents cd305f9 + f37345e commit 91823e2
Show file tree
Hide file tree
Showing 8 changed files with 2,640 additions and 0 deletions.
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"
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,508 changes: 2,508 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
47 changes: 47 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,47 @@
title: dynamic resource allocation
kep-number: 3063
authors:
- "@pohly"
owning-sig: sig-node
participating-sigs:
- sig-scheduling
- sig-autoscaling
status: implementable
creation-date: 2021-05-17
reviewers:
- "@ahg-g"
- "@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.28"
stable: "v1.30"

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

0 comments on commit 91823e2

Please sign in to comment.