Skip to content

kubelet: implement admission check for DRA#34

Closed
bart0sh wants to merge 1 commit into
pohly:dynamic-resource-allocationfrom
bart0sh:PR016-dra-admission-check
Closed

kubelet: implement admission check for DRA#34
bart0sh wants to merge 1 commit into
pohly:dynamic-resource-allocationfrom
bart0sh:PR016-dra-admission-check

Conversation

@bart0sh

@bart0sh bart0sh commented Sep 28, 2022

Copy link
Copy Markdown

Don't allow pod admission if pod is not present in the resourceClaim.Status.ReservedFor.

Don't allow pod admission if pod is not present in the
resourceClaim.Status.ReservedFor

This change required certain refactoring work in the
kubelet container manager as DRA Manager is not a topology
hint provider and topology manager can't handle its admission
checks.
@bart0sh

bart0sh commented Sep 28, 2022

Copy link
Copy Markdown
Author

/cc @pohly @klueska

@bart0sh bart0sh mentioned this pull request Sep 28, 2022
func (m *ManagerImpl) Admit(pod *v1.Pod) error {
for _, podResourceClaim := range pod.Spec.ResourceClaims {
claimName := resourceclaim.Name(pod, &podResourceClaim)
klog.V(3).InfoS("Check if pod can be admited", "pod", pod.Name, "claim", claimName)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Typo: admited -> admitted

Comment thread pkg/kubelet/cm/dra/manager.go
@bart0sh

bart0sh commented Sep 29, 2022

Copy link
Copy Markdown
Author

Closing as querying API server on admission can slow down the Kubelet according to @pohly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants