Skip to content

Post-process HTTPProxy CRD schema to remove error as a required field#7408

Merged
tsaarni merged 1 commit into
projectcontour:mainfrom
Nordix:fix-lb-status-ports-required
Feb 8, 2026
Merged

Post-process HTTPProxy CRD schema to remove error as a required field#7408
tsaarni merged 1 commit into
projectcontour:mainfrom
Nordix:fix-lb-status-ports-required

Conversation

@tsaarni

@tsaarni tsaarni commented Feb 7, 2026

Copy link
Copy Markdown
Member

This PR adds a post-processing step to make generate to prevent status.loadBalancer.ingress[].ports[].error from being incorrectly marked as required in the HTTPProxy CRD schema, which caused load balancer status update failures.

The issue happens because the HTTPProxy embeds the Kubernetes core_v1.LoadBalancerStatus. This type contains PortStatus struct with some conflicting markers, and controller-tools v0.16.x changed how it handles conflicting +optional and +kubebuilder:validation:Required marker. Rewriting the status struct to remove its dependency on the external package would be best solution, but it would break Go API compatibility for HTTPProxy.

The modification uses kubectl patch with the exact path to the data structure and includes test for recognizing if the field is still there before processing. This approach should be robust and not affect wrong fields.

Fixes #7391

@tsaarni tsaarni requested a review from a team as a code owner February 7, 2026 10:56
@tsaarni tsaarni requested review from sunjayBhatia and removed request for a team February 7, 2026 10:56
@sunjayBhatia sunjayBhatia requested review from a team, clayton-gonsalves and izturn and removed request for a team February 7, 2026 10:57
@tsaarni tsaarni added the release-note/small A small change that needs one line of explanation in the release notes. label Feb 7, 2026
@tsaarni tsaarni force-pushed the fix-lb-status-ports-required branch 2 times, most recently from bbe71cc to 0b5f8f0 Compare February 7, 2026 11:05
@codecov

codecov Bot commented Feb 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.85%. Comparing base (3fcf197) to head (986a537).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7408   +/-   ##
=======================================
  Coverage   81.85%   81.85%           
=======================================
  Files         130      130           
  Lines       15766    15766           
=======================================
  Hits        12906    12906           
  Misses       2576     2576           
  Partials      284      284           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
@tsaarni tsaarni force-pushed the fix-lb-status-ports-required branch from 0b5f8f0 to 986a537 Compare February 7, 2026 11:17
@tsaarni tsaarni merged commit c28b68e into projectcontour:main Feb 8, 2026
41 of 42 checks passed
tsaarni added a commit to Nordix/contour that referenced this pull request Feb 8, 2026
tsaarni added a commit to Nordix/contour that referenced this pull request Feb 8, 2026
tsaarni added a commit to Nordix/contour that referenced this pull request Feb 8, 2026
tsaarni added a commit to Nordix/contour that referenced this pull request Feb 8, 2026
tsaarni added a commit that referenced this pull request Feb 13, 2026
tsaarni added a commit that referenced this pull request Feb 13, 2026
tsaarni added a commit that referenced this pull request Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/small A small change that needs one line of explanation in the release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPProxy status update fails with "ports[].error: Required value" when using AWS NLB

1 participant