Resources prefixed with *kubernetes.io/ should remain unscheduled if they are not exposed on the node.
Currently, resources prefixed with *kubernetes.io/ get scheduled to any node whether it's exposing that resource or not. On the other hand, resources prefixed with someother.domain/ don't get scheduled to a node until that node is exposing that resource (or if the resource is ignored because of scheduler extender). This commit brings the behavior of *kubernetes.io/ prefixed resources in line with other extended resources and they will remain unscheduled until some node exposes these resources. This also includes renaming IsDefaultNamespaceResource() to IsNativeResource().
This commit is contained in:
@@ -75,7 +75,7 @@ func validateContainerResourceName(value string, fldPath *field.Path) field.Erro
|
||||
if !helper.IsStandardContainerResourceName(value) {
|
||||
return append(allErrs, field.Invalid(fldPath, value, "must be a standard resource for containers"))
|
||||
}
|
||||
} else if !v1helper.IsDefaultNamespaceResource(v1.ResourceName(value)) {
|
||||
} else if !v1helper.IsNativeResource(v1.ResourceName(value)) {
|
||||
if !v1helper.IsExtendedResourceName(v1.ResourceName(value)) {
|
||||
return append(allErrs, field.Invalid(fldPath, value, "doesn't follow extended resource name standard"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user