-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: Correct error message on missing path in path validation #2971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @zachomedia
Thanks for the PR! I'm just trying to understand your config, did you use an empty path before v2.3.0
with the pathType
as ImplementationSpecific
? Because I think that's the only way to not get an error form k8s when applying the Ingress with recent versions of k8s. Are you using an old version? Any additional info would be appreciated 😄
docs/content/configuration/ingress-resources/basic-configuration.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Luca Comellini <luca.com@gmail.com>
@lucacome Your guess would be correct :) We had some old ingresses which were using We fixed up the ingresses which brought them back, this PR should help anyone else who encounters this find the issue a bit quicker since it'll point to the right spot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we might revisit the enforcement when the pathType
is ImplementationSpecific
since technically the path
shouldn't be required in that case, but for now we should merge this so at least the error is clear.
Thanks again @zachomedia !
Codecov Report
@@ Coverage Diff @@
## main #2971 +/- ##
=======================================
Coverage 52.31% 52.31%
=======================================
Files 58 58
Lines 15995 15995
=======================================
Hits 8368 8368
Misses 7350 7350
Partials 277 277
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue here in this description (not in the title of the PR).
In #2775 some path validation was added, including making the
path
field within the rules required (Kubernetes does not require it). The error message we were receiving wasspec: Required field
, which didn't point obviously to the issue.The PR fixes the error message to point to the correct place. With this fix, you'll now see
spec.rules[0].http.path[0].path: Required value
. Additionally, I have noted the required value in theRestrictions
section of the documentation.Checklist
Before creating a PR, run through this checklist and mark each as complete.