Skip to content

OCPBUGS-86238: set limits for aro.openshift.io/swift-nic in request overrides for ARO swift#8552

Merged
enxebre merged 2 commits into
openshift:mainfrom
enxebre:swift-nic-resource-limit-override
May 21, 2026
Merged

OCPBUGS-86238: set limits for aro.openshift.io/swift-nic in request overrides for ARO swift#8552
enxebre merged 2 commits into
openshift:mainfrom
enxebre:swift-nic-resource-limit-override

Conversation

@enxebre
Copy link
Copy Markdown
Member

@enxebre enxebre commented May 20, 2026

Summary

  • When using resource-request-override.hypershift.openshift.io/ to override extended resources like aro.openshift.io/swift-nic, the pod fails API server admission because Kubernetes requires limits == requests for extended resources
  • Adds applyNonOvercommitableResourceLimits() to automatically set limits equal to requests for aro.openshift.io/swift-nic during request overrides
  • Applies to both init containers and regular containers

Jira

https://issues.redhat.com/browse/OCPBUGS-86238

Test plan

  • Unit tests for applyNonOvercommitableResourceLimits (3 cases: swift-nic only, standard resources, mixed)
  • Unit tests for applyRequestsOverrides integration (5 cases: cpu/memory, swift-nic, mixed, init containers, different deployment)
  • make verify passes (codespell, lint, build, tests)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Resource override handling now also sets matching limits for a specific extended resource so overrides apply consistently to init and regular containers.
  • Tests

    • New unit tests validate override behavior for standard resources, the extended resource, mixed cases, and annotation targeting.
  • Chores

    • CI pipeline tasks updated to enable the package registry proxy during dependency prefetch.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 20, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 20, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-86238, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

  • When using resource-request-override.hypershift.openshift.io/ to override extended resources like aro.openshift.io/swift-nic, the pod fails API server admission because Kubernetes requires limits == requests for extended resources
  • Adds applyNonOvercommitableResourceLimits() to automatically set limits equal to requests for aro.openshift.io/swift-nic during request overrides
  • Applies to both init containers and regular containers

Jira

https://issues.redhat.com/browse/OCPBUGS-86238

Test plan

  • Unit tests for applyNonOvercommitableResourceLimits (3 cases: swift-nic only, standard resources, mixed)
  • Unit tests for applyRequestsOverrides integration (5 cases: cpu/memory, swift-nic, mixed, init containers, different deployment)
  • make verify passes (codespell, lint, build, tests)

🤖 Generated with Claude Code

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label May 20, 2026
@enxebre enxebre marked this pull request as ready for review May 20, 2026 08:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c6727f58-3fe5-4e13-a9f5-620185f37ed8

📥 Commits

Reviewing files that changed from the base of the PR and between 69d9dd8 and b424129.

📒 Files selected for processing (2)
  • .tekton/hypershift-operator-main-tag.yaml
  • .tekton/pipelines/common-operator-build.yaml

📝 Walkthrough

Walkthrough

This PR enforces limits == requests for the aro.openshift.io/swift-nic extended resource by adding applyNonOvercommitableResourceLimits and calling it from applyRequestsOverrides after copying request overrides into init and regular containers. Tests and an import were added to verify request override behavior and that limits are set only for the non-overcommittable Swift-NIC resource while standard resources remain unchanged.

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding limits for aro.openshift.io/swift-nic resource in request overrides, matching the core implementation in defaults.go and test coverage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Tests use Go standard testing (t.Run), not Ginkgo. Ginkgo-specific check is not applicable to this PR. All test names are static, descriptive strings with no dynamic values.
Test Structure And Quality ✅ Passed Custom check is for Ginkgo tests; PR contains standard Go unit tests with table-driven patterns using testing.T, not Ginkgo's Describe/It blocks. Check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests added in this PR. Only standard Go unit tests in defaults_test.go and production code changes.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds only standard Go unit tests (TestApplyRequestsOverrides, TestApplyNonOvercommitableResourceLimits) using the testing package, not Ginkgo e2e tests. SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed No scheduling constraints introduced. Changes only modify resource limits for aro.openshift.io/swift-nic; no pod affinity, tolerations, nodeSelectors, or topology constraints added.
Ote Binary Stdout Contract ✅ Passed PR modifies Go code (defaults.go/defaults_test.go) and YAML pipelines with no process-level stdout writes; all fmt usage is for errors, no klog/os.Stdout, test functions are properly scoped.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests are added. PR adds only standard Go unit tests to defaults_test.go. Custom check is not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-area labels May 20, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 20, 2026
@enxebre enxebre force-pushed the swift-nic-resource-limit-override branch from b5cc6f6 to 98234f8 Compare May 20, 2026 08:12
@enxebre enxebre changed the title OCPBUGS-86238: Set limits for extended resources in request overrides OCPBUGS-86238: Set limits for extended resources in request overrides for ARO swift May 20, 2026
@openshift-ci openshift-ci Bot requested review from csrwng and devguyio May 20, 2026 08:12
@enxebre enxebre force-pushed the swift-nic-resource-limit-override branch from 98234f8 to a418b82 Compare May 20, 2026 08:12
@enxebre enxebre changed the title OCPBUGS-86238: Set limits for extended resources in request overrides for ARO swift OCPBUGS-86238: set limits for aro.openshift.io/swift-nic in request overrides for ARO swift May 20, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
support/controlplane-component/defaults_test.go (1)

289-521: ⚡ Quick win

Enable parallel execution in the new unit tests.

Please add t.Parallel() in TestApplyRequestsOverrides and TestApplyNonOvercommitableResourceLimits (and inside each t.Run) to align with test execution guidance and keep CI time down.

Proposed diff
 func TestApplyRequestsOverrides(t *testing.T) {
+	t.Parallel()
 	tests := []struct {
@@
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			t.Parallel()
 			g := NewGomegaWithT(t)
@@
 func TestApplyNonOvercommitableResourceLimits(t *testing.T) {
+	t.Parallel()
 	tests := []struct {
@@
 	for _, test := range tests {
 		t.Run(test.name, func(t *testing.T) {
+			t.Parallel()
 			g := NewGomegaWithT(t)

As per coding guidelines, "Use race detection and parallel execution for unit tests".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@support/controlplane-component/defaults_test.go` around lines 289 - 521,
Tests TestApplyRequestsOverrides and TestApplyNonOvercommitableResourceLimits
are not marked for parallel execution; add t.Parallel() at the start of each
top-level test function (TestApplyRequestsOverrides and
TestApplyNonOvercommitableResourceLimits) and inside each subtest closure (the
func passed to t.Run) so each subtest runs in parallel; ensure t.Parallel() is
the first statement in those functions to follow Go testing guidance and avoid
shared-state races when calling workload.applyRequestsOverrides and
applyNonOvercommitableResourceLimits.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@support/controlplane-component/defaults_test.go`:
- Around line 289-521: Tests TestApplyRequestsOverrides and
TestApplyNonOvercommitableResourceLimits are not marked for parallel execution;
add t.Parallel() at the start of each top-level test function
(TestApplyRequestsOverrides and TestApplyNonOvercommitableResourceLimits) and
inside each subtest closure (the func passed to t.Run) so each subtest runs in
parallel; ensure t.Parallel() is the first statement in those functions to
follow Go testing guidance and avoid shared-state races when calling
workload.applyRequestsOverrides and applyNonOvercommitableResourceLimits.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0fb84255-e279-425e-b1db-51a82c56fa4e

📥 Commits

Reviewing files that changed from the base of the PR and between 9e283ae and b5cc6f6.

📒 Files selected for processing (2)
  • support/controlplane-component/defaults.go
  • support/controlplane-component/defaults_test.go

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
support/controlplane-component/defaults_test.go (1)

289-467: ⚡ Quick win

Strong test coverage for the override logic.

The test cases comprehensively verify standard resources, extended resources, mixed scenarios, init containers, and deployment name filtering.

Consider adding an edge case test after fixing the nil Resources.Requests issue flagged in defaults.go: verify that overrides work correctly when a container has no pre-existing resource requirements (nil Resources.Requests map). This would prevent regression of the nil-map panic.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@support/controlplane-component/defaults_test.go` around lines 289 - 467, Add
a new subtest in TestApplyRequestsOverrides that covers the edge case where a
container has Resources set but Resources.Requests is nil (not an empty map);
call workload.applyRequestsOverrides with an annotation like
"resource-request-override.hypershift.openshift.io/router.router": "cpu=250m"
and assert the container ends up with Requests populated accordingly. Ensure the
test targets the same workload.applyRequestsOverrides method and validates both
Containers and InitContainers variants as needed so we catch the nil-map panic
previously observed in defaults.go.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@support/controlplane-component/defaults.go`:
- Around line 427-439: The loop copies into container resource request maps that
may be nil causing a panic; before calling maps.Copy in both the InitContainers
and Containers loops, ensure
podTemplate.Spec.InitContainers[i].Resources.Requests and
podTemplate.Spec.Containers[i].Resources.Requests are non-nil (initialize to an
empty v1.ResourceList if nil) and then call maps.Copy and
applyNonOvercommitableResourceLimits(&podTemplate.Spec.InitContainers[i], res) /
applyNonOvercommitableResourceLimits(&podTemplate.Spec.Containers[i], res) as
currently done.

---

Nitpick comments:
In `@support/controlplane-component/defaults_test.go`:
- Around line 289-467: Add a new subtest in TestApplyRequestsOverrides that
covers the edge case where a container has Resources set but Resources.Requests
is nil (not an empty map); call workload.applyRequestsOverrides with an
annotation like
"resource-request-override.hypershift.openshift.io/router.router": "cpu=250m"
and assert the container ends up with Requests populated accordingly. Ensure the
test targets the same workload.applyRequestsOverrides method and validates both
Containers and InitContainers variants as needed so we catch the nil-map panic
previously observed in defaults.go.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0b1eb6b6-fe8d-4391-90b9-ccd1620561ab

📥 Commits

Reviewing files that changed from the base of the PR and between b5cc6f6 and a418b82.

📒 Files selected for processing (2)
  • support/controlplane-component/defaults.go
  • support/controlplane-component/defaults_test.go

Comment thread support/controlplane-component/defaults.go
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.37%. Comparing base (9e283ae) to head (b424129).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8552      +/-   ##
==========================================
+ Coverage   40.34%   40.37%   +0.02%     
==========================================
  Files         755      755              
  Lines       93167    93175       +8     
==========================================
+ Hits        37587    37618      +31     
+ Misses      52877    52856      -21     
+ Partials     2703     2701       -2     
Files with missing lines Coverage Δ
support/controlplane-component/defaults.go 65.23% <100.00%> (+5.35%) ⬆️
Flag Coverage Δ
cmd-support 34.39% <100.00%> (+0.09%) ⬆️
cpo-hostedcontrolplane 41.76% <ø> (ø)
cpo-other 40.14% <ø> (ø)
hypershift-operator 50.72% <ø> (ø)
other 31.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

}
}

func TestApplyNonOvercommitableResourceLimits(t *testing.T) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this already covered in TestApplyRequestsOverrides

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I still want to cover this function in isolation as a consumable piece of code.

Copy link
Copy Markdown
Contributor

@jparrill jparrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped some minor nits. Otherwise lgtm

// The API server requires limits == requests for these resources.
// https://github.com/kubernetes/kubernetes/blob/621e250502ddeeab8274836e88b506c0c4f57232/pkg/apis/core/validation/validation.go#L7975-L7976
func applyNonOvercommitableResourceLimits(container *corev1.Container, overrides corev1.ResourceList) {
for resourceName, quantity := range overrides {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: if we keep the single-resource approach, a direct map lookup is cleaner than iterating the whole map:

if quantity, ok := overrides[aroSwiftNICResource]; ok {
	if container.Resources.Limits == nil {
		container.Resources.Limits = corev1.ResourceList{}
	}
	container.Resources.Limits[aroSwiftNICResource] = quantity
}

This becomes moot if we go with a generic isExtendedResource approach (where the loop is the right pattern).

}{
{
name: "When overriding cpu and memory it should only update requests",
annotations: map[string]string{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: these annotation keys are hardcoded as string literals, but the production code uses hyperv1.ResourceRequestOverrideAnnotationPrefix. Using the constant here would prevent drift if the prefix ever changes:

hyperv1.ResourceRequestOverrideAnnotationPrefix + "/router.router": "cpu=500m,memory=1Gi",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is intentionally using the literal, I want this tests to break if the value of the constant is changed, to ensure that is a conscious action.

…c in request overrides

The resource-request-override annotation only sets requests, but
extended resources like aro.openshift.io/swift-nic require limits
equal to requests. The API server rejects pods where an extended
resource has a request without a matching limit.

When the override includes aro.openshift.io/swift-nic, automatically
set the limit to the same value as the request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@enxebre enxebre force-pushed the swift-nic-resource-limit-override branch from a418b82 to 69d9dd8 Compare May 20, 2026 11:47
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
support/controlplane-component/defaults.go (1)

427-437: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Guard Resources.Requests before maps.Copy to avoid nil-map panic.

Line 429 and Line 435 can panic when Resources.Requests is nil. Initialize the destination map before copying in both loops.

Proposed fix
 for i, c := range podTemplate.Spec.InitContainers {
 	if res, ok := requestsOverrides[c.Name]; ok {
+		if podTemplate.Spec.InitContainers[i].Resources.Requests == nil {
+			podTemplate.Spec.InitContainers[i].Resources.Requests = corev1.ResourceList{}
+		}
 		maps.Copy(podTemplate.Spec.InitContainers[i].Resources.Requests, res)
 		applyNonOvercommitableResourceLimits(&podTemplate.Spec.InitContainers[i], res)
 	}
 }
 for i, c := range podTemplate.Spec.Containers {
 	if res, ok := requestsOverrides[c.Name]; ok {
+		if podTemplate.Spec.Containers[i].Resources.Requests == nil {
+			podTemplate.Spec.Containers[i].Resources.Requests = corev1.ResourceList{}
+		}
 		maps.Copy(podTemplate.Spec.Containers[i].Resources.Requests, res)
 		applyNonOvercommitableResourceLimits(&podTemplate.Spec.Containers[i], res)
 	}
 }
#!/bin/bash
# Verify potential nil-map writes in applyRequestsOverrides and whether guards exist.
rg -n -C3 'maps\.Copy\(podTemplate\.Spec\.(InitContainers|Containers)\[i\]\.Resources\.Requests,\s*res\)' support/controlplane-component/defaults.go
rg -n -C2 'Resources\.Requests\s*==\s*nil' support/controlplane-component/defaults.go
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@support/controlplane-component/defaults.go` around lines 427 - 437, The loops
over podTemplate.Spec.InitContainers and podTemplate.Spec.Containers call
maps.Copy into podTemplate.Spec.*[i].Resources.Requests which can be nil; before
calling maps.Copy, check if podTemplate.Spec.*[i].Resources.Requests == nil and
initialize it to an empty corev1.ResourceList (or equivalent) so maps.Copy has a
non-nil destination, then call maps.Copy(...) and
applyNonOvercommitableResourceLimits(&podTemplate.Spec.*[i], res) as before to
avoid nil-map panics.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@support/controlplane-component/defaults.go`:
- Around line 427-437: The loops over podTemplate.Spec.InitContainers and
podTemplate.Spec.Containers call maps.Copy into
podTemplate.Spec.*[i].Resources.Requests which can be nil; before calling
maps.Copy, check if podTemplate.Spec.*[i].Resources.Requests == nil and
initialize it to an empty corev1.ResourceList (or equivalent) so maps.Copy has a
non-nil destination, then call maps.Copy(...) and
applyNonOvercommitableResourceLimits(&podTemplate.Spec.*[i], res) as before to
avoid nil-map panics.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 01e1928b-a800-4a11-97a4-b212b5035599

📥 Commits

Reviewing files that changed from the base of the PR and between a418b82 and 69d9dd8.

📒 Files selected for processing (2)
  • support/controlplane-component/defaults.go
  • support/controlplane-component/defaults_test.go

@muraee
Copy link
Copy Markdown
Contributor

muraee commented May 20, 2026

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@cwbotbot
Copy link
Copy Markdown

cwbotbot commented May 20, 2026

Test Results

e2e-aws

e2e-aks

machi1990 added a commit to machi1990/ARO-HCP that referenced this pull request May 20, 2026
…iversion.go so we can validate Swift NIC scheduling end-to-end

 Hypershift sets aro.openshift.io/swift-nic limits overrides (openshift/hypershift#8552) by ensuring it matches the request override value sets by CS in https://redhat.atlassian.net/browse/ARO-27209 for 4.23+ clusters.

We want to have an e2e that guarantees that when the hypershift change is merged and the CS change bumped, it'll be functional.
machi1990 added a commit to machi1990/ARO-HCP that referenced this pull request May 20, 2026
…iversion.go so we can validate Swift NIC scheduling end-to-end

 Hypershift sets aro.openshift.io/swift-nic limits overrides (openshift/hypershift#8552) by ensuring it matches the request override value sets by CS in https://redhat.atlassian.net/browse/ARO-27209 for 4.23+ clusters.

We want to have an e2e that guarantees that when the hypershift change is merged and the CS change bumped, it'll be functional.
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

@enxebre: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented May 21, 2026

/verified by units @enxebre

@enxebre enxebre merged commit 3779a6a into openshift:main May 21, 2026
44 of 45 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: Jira Issue OCPBUGS-86238: Some pull requests linked via external trackers have merged:

The following pull request, linked via external tracker, has not merged:

All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-86238 has not been moved to the MODIFIED state.

Details

In response to this:

Summary

  • When using resource-request-override.hypershift.openshift.io/ to override extended resources like aro.openshift.io/swift-nic, the pod fails API server admission because Kubernetes requires limits == requests for extended resources
  • Adds applyNonOvercommitableResourceLimits() to automatically set limits equal to requests for aro.openshift.io/swift-nic during request overrides
  • Applies to both init containers and regular containers

Jira

https://issues.redhat.com/browse/OCPBUGS-86238

Test plan

  • Unit tests for applyNonOvercommitableResourceLimits (3 cases: swift-nic only, standard resources, mixed)
  • Unit tests for applyRequestsOverrides integration (5 cases: cpu/memory, swift-nic, mixed, init containers, different deployment)
  • make verify passes (codespell, lint, build, tests)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

  • Resource override handling now also sets matching limits for a specific extended resource so overrides apply consistently to init and regular containers.

  • Tests

  • New unit tests validate override behavior for standard resources, the extended resource, mixed cases, and annotation targeting.

  • Chores

  • CI pipeline tasks updated to enable the package registry proxy during dependency prefetch.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@enxebre: #8552 failed to apply on top of branch "release-4.20":

Applying: fix(control-plane-operator): set limits for aro.openshift.io/swift-nic in request overrides
Applying: fix(tekton): enable package registry proxy in prefetch-dependencies task
Using index info to reconstruct a base tree...
A	.tekton/hypershift-operator-main-tag.yaml
A	.tekton/pipelines/common-operator-build.yaml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): .tekton/pipelines/common-operator-build.yaml deleted in HEAD and modified in fix(tekton): enable package registry proxy in prefetch-dependencies task. Version fix(tekton): enable package registry proxy in prefetch-dependencies task of .tekton/pipelines/common-operator-build.yaml left in tree.
CONFLICT (modify/delete): .tekton/hypershift-operator-main-tag.yaml deleted in HEAD and modified in fix(tekton): enable package registry proxy in prefetch-dependencies task. Version fix(tekton): enable package registry proxy in prefetch-dependencies task of .tekton/hypershift-operator-main-tag.yaml left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 fix(tekton): enable package registry proxy in prefetch-dependencies task

Details

In response to this:

/cherry-pick release-4.22
/cherry-pick release-4.21
/cherry-pick release-4.20

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-sigs/prow repository.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@enxebre: new pull request created: #8564

Details

In response to this:

/cherry-pick release-4.22
/cherry-pick release-4.21
/cherry-pick release-4.20

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-sigs/prow repository.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@enxebre: new pull request created: #8565

Details

In response to this:

/cherry-pick release-4.22
/cherry-pick release-4.21
/cherry-pick release-4.20

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-sigs/prow repository.

machi1990 added a commit to machi1990/ARO-HCP that referenced this pull request May 21, 2026
…r NIC scheduling

Pick the fix done in this PR openshift/hypershift#8552 and test it against the CS bump to validate that it works end to end
machi1990 added a commit to machi1990/ARO-HCP that referenced this pull request May 21, 2026
…r NIC scheduling

Pick the fix done in this PR openshift/hypershift#8552 and test it against the CS bump to validate that it works end to end
@openshift-merge-robot
Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-05-21-222828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants