Description
PodLevelResources feature is not supported on Windows OS. Add the necessary validation logic to reject pods for Windows.
From the KEP #2837, until full Windows support for pod-level resource specifications is implemented, the behavior for pods, with pod-level resources, targeting Windows is as follows:
-
API Server Validation: If the spec.os.name field in the Pod specification is explicitly set to "windows", the Kubernetes API server will generally reject the pod during validation.
Add the following logic in validatePodResources
// windows pods are not supported.
if oldPod.Spec.OS != nil && oldPod.Spec.OS.Name == core.Windows && pod level resources are set {
return field.ErrorList....
} -
Kubelet Admission: The Kubelet running on a Windows node would reject the pod, with pod-level resources, during admission.
Add IsPodLevelResourcesAllowed in features_windows.go, features_linux.go and features_unsupported.go (example - ref
and call this method from SyncPod) if pod level resources are set in the spec
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status