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
Move pkg/apis/core/v1.IsScalarResourceName under pkg/scheduler/util #96109
Move pkg/apis/core/v1.IsScalarResourceName under pkg/scheduler/util #96109
Conversation
IsScalarResourceName is imported only inside pkg/scheduler packages.
@ingvagabund: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@alculquicondor for the scheduling part, are you ok with moving the helper under the scheduler? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
I kind of want to get rid of the pkg/scheduler/util
package at some point (the name is too generic), but this is good for now.
@liggitt PTAL for the approval. The PR was already reviewed by the scheduler team. |
/retest |
1 similar comment
/retest |
I'm in favor of isolating this because the v1 helpers are easy to accidentally misuse, but as long as this is still calling other v1helper methods, I don't think it's actually reduced kubernetes/kubernetes dependencies /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, ingvagabund, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -163,3 +164,9 @@ func ClearNominatedNodeName(cs kubernetes.Interface, pods ...*v1.Pod) utilerrors | |||
} | |||
return utilerrors.NewAggregate(errs) | |||
} | |||
|
|||
// IsScalarResourceName validates the resource for Extended, Hugepages, Native and AttachableVolume resources | |||
func IsScalarResourceName(name v1.ResourceName) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm starting to wonder if we really need this check. Which resources would fail it, other than the ones we already pre-fetch early in Resource.Add
or Resource.Max
?
IsScalarResourceName is imported only inside pkg/scheduler packages.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Part of minimizing dependencies of the scheduling framework on kubernetes/kubernetes repository
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: