Skip to content

Conversation

@Thealisyed
Copy link

Summary

  • Add route path validation to reject # or whitespace characters in spec.path
  • Add validatePath function and integrate it with ValidateRoute and ValidateRouteUpdate
  • Includes comprehensive test coverage for path validation

This ensures routes with invalid path characters that would cause HAProxy errors are rejected at the API level.

Related bug: https://issues.redhat.com/browse/OCPBUGS-47773

Cherry-picked from #2012 with tests included.

Assisted with Claude

This commit introduces api validation to reject # or whitespace
in the spec.path. This is becaause it causes HaProxy error and the
inress to become degraded.
The validation will reject any new route that tries to create with
whitespace or # in spec.path. It will allow for ratcheting.
Test cases are also introduced in the validation_test.go file

Related bug: https://issues.redhat.com/browse/OCPBUGS-47773
@openshift-ci openshift-ci bot requested review from Miciah and knobunc February 11, 2026 09:47
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Thealisyed
Once this PR has been reviewed and has the lgtm label, please assign miciah for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

@Thealisyed: 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant