Skip to content

Reduce code changes needed to support a new resource name. #50473

@ConnorDoyle

Description

@ConnorDoyle

/kind feature

Any resource without a domain name or with kubernetes.io/ domain name should continue to be treated as first class. Everything else could be treated as integer resources, until a future API allows specifying whether a resource is integral/fractional.

Opaque Integer Resources (also called OIR, alpha in v1.5.0), is implemented by special-casing resources with a certain prefix. Since the default scheduler currently handles all resources except CPU as integers, this could be codified as default behavior for resources that do not belong to the kubernetes.io/ namespace. This would reduce the proliferation of very similar code in admission control, scheduler predicates, kubelet, kubectl, etc. when adding support for additional classes of resources, such as resources advertised by extensions. The initial use case is the upcoming alpha device plugin interface. Resources advertised via device plugins will share the extensions.kubernetes.io/ namespace.

Related issues:

cc @vishh @RenaudWasTaken @thockin @davidopp

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.sig/schedulingCategorizes an issue or PR as relevant to SIG Scheduling.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions