[release-4.21] OCPBUGS-77456: Add dynamic NodePort range validation#7820
Conversation
Add validation for NodePort.Port to ensure ports fall within the cluster's configured ServiceNodePortRange. This prevents late failures during cluster provisioning when the control-plane-operator rejects ports outside the acceptable range. The validation: - Reads cluster-specific ServiceNodePortRange or uses default (30000-32767) - Validates NodePort.Port against the configured range - Allows port 0 (dynamic assignment) - Provides clear error messages with the actual configured range Fixes an issue where specifying invalid NodePort values (e.g., 10000) would cause cluster creation to fail after resources were created. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
|
@jparrill: This pull request references Jira Issue OCPBUGS-77456, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/jira refresh |
|
@jparrill: This pull request references Jira Issue OCPBUGS-77456, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yli2@redhat.com), skipping review request. DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, jparrill 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 |
|
/verified by e2e |
|
@jparrill: This PR has been marked as verified by DetailsIn response to this:
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. |
|
/label backport-risk-assessed |
|
/retest-required |
2 similar comments
|
/retest-required |
|
/retest-required |
|
@jparrill: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
4edc8fa
into
openshift:release-4.21
|
@jparrill: Jira Issue Verification Checks: Jira Issue OCPBUGS-77456 Jira Issue OCPBUGS-77456 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
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. |
|
Fix included in accepted release 4.21.0-0.nightly-2026-03-16-041356 |
Summary
Manual backport of #7652
NodePort.Portto ensure ports fall within the cluster's configuredServiceNodePortRangeServiceNodePortRangeor uses default (30000-32767)Test plan
TestParseNodePortRangepassTestValidateNodePortPortRangepass🤖 Generated with Claude Code