Repository navigation
fix: generate safe ingress hostnames for long PVC namespaces - #33
msajidmansoori12 wants to merge 3 commits into
Conversation
Signed-off-by: M Sajid Mansoori <mmansoor@redhat.com>
Signed-off-by: M Sajid Mansoori <mmansoor@redhat.com>
|
@aufi: changing LGTM is restricted to collaborators 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 kubernetes-sigs/prow repository. |
|
/approve |
|
I re-enabled GH actions, but I think you're going to have to push another commit to actually trigger the run. |
Signed-off-by: M Sajid Mansoori <mmansoor@redhat.com>
|
Hi @JohnStrunk , i re pushed a commit but lgtm label is removed , can you please add it again. Thanks ! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aufi, JohnStrunk, msajidmansoori12 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 |
Describe what this PR does
This PR fixes ingress hostname generation for long PVC name/namespace combinations.
Previously, the ingress host prefix was truncated with a raw slice, which could leave the first DNS label ending in
-and cause Kubernetes to reject the Ingress as invalid.The fix replaces plain truncation with safe hash-based truncation so long generated hostnames remain RFC1123-compliant while also reducing collisions for similar long names.
Is there anything that requires special attention?
This change only affects long generated ingress hostnames. Short hostnames are unchanged.
I verified the fix locally by reproducing the original failure case with a 63-character namespace on minikube. Before this change,
transfer-pvcfailed during Ingress creation withspec.rules[0].host: Invalid value. After this change, the generated ingress hostname is valid and the PVC transfer completes successfully.Related issues: