Skip non-Windows pods in Hyper-V mutating webhook#561
Conversation
The webhook injects the runhcs-wcow-hypervisor RuntimeClass into all pods except HostProcess, HostNetwork, and explicitly Linux pods. This causes test fixture pods (e.g., ResourceQuota tests with unsatisfiable nodeSelectors) to receive 512Mi Pod Overhead, breaking resource accounting in those tests. Add a check to skip pods that have custom nodeSelectors but no kubernetes.io/os selector. These are likely test fixtures, not actual Windows workloads.
|
Hi @rzlink. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
/ok-to-test |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marosset, rzlink The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does
Fixes the Hyper-V mutating webhook to skip pods that have custom nodeSelectors but no
kubernetes.io/osselector. These are test fixture pods (e.g., ResourceQuota tests withx-test.k8s.io/unsatisfiableselectors) that are not intended to run as Windows workloads.Why this is needed
After PR #560 added Pod Overhead (512Mi memory, 100m CPU) to the
runhcs-wcow-hypervisorRuntimeClass, the webhook injects this RuntimeClass into all pods that aren't explicitly Linux, HostProcess, or HostNetwork. This includes test fixture pods that never run on Windows nodes, causing 4 consistent ResourceQuota test failures oncapz-windows-master-hyperv:How the fix works
{}(empty, common in e2e tests){kubernetes.io/os: windows}{kubernetes.io/os: linux}{x-test.k8s.io/unsatisfiable: ...}{tier: frontend}(no OS)CI Impact
Fixes 4 consistent failures on capz-windows-master-hyperv:
/cc @jsturtevant @kiashok