dovics opened a new pull request, #2780:
URL: https://github.com/apache/apisix-ingress-controller/pull/2780
… are empty
<!-- Please answer these questions before submitting a pull request -->
### Type of change:
<!-- Please delete options that are not relevant. -->
<!-- Select all the options from below that matches the type your PR best -->
- [x] Bugfix
### What this PR does / why we need it:
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
This PR fixes a panic when translating an Ingress that has no annotations
and uses `pathType: ImplementationSpecific`.
`TranslateIngressAnnotations()` returns `nil` when the Ingress has no
annotations. Before this change, the Ingress translator directly accessed
`config.UseRegex` while handling
`PathTypeImplementationSpecific`, which caused a nil pointer dereference.
This change adds a nil check before reading `UseRegex`, so an Ingress
without annotations is translated safely. Regex matching is still enabled only
when the `k8s.apisix.apache.org/use-regex` annotation is
present and set to `true`.
### Pre-submission checklist:
<!--
Please follow the requirements:
1. Use Draft if the PR is not ready to be reviewed
2. Test is required for the feat/fix PR, unless you have a good reason
3. Doc is required for the feat PR
4. Use a new commit to resolve review instead of `push -f`
5. Use "request review" to notify the reviewer once you have resolved the
review
-->
- [x] Did you explain what problem does this PR solve? Or what new
features have been added?
- [ ] Have you added corresponding test cases?
- [ ] Have you modified the corresponding document?
- [x] Is this PR backward
compatible?(https://github.com/apache/apisix-ingress-controller#community)
first**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]