You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/11/30 12:45:01 UTC
[GitHub] [apisix-ingress-controller] lxm opened a new pull request #779: feat: support regex in path
lxm opened a new pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [ ] New feature provided
- Related issues #768
___
### New feature or improvement
- support a new annotation `k8s.apisix.apache.org/use-regex` which to change path behavior using apisix's vars
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tokers commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tokers commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984214474
> > We may also add some test cases.
>
> have written more test cases. retested the feature
By say adding test cases, we'd better also add the E2E test cases.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 merged pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tao12345666333 merged pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762533120
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +94,49 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Value: &pathRule.Path,
Review comment:
this path comes from ingress resources, I don't thinke we need to do this.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762553682
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +94,49 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Value: &pathRule.Path,
Review comment:
Why? Does the Ingress resource validator validate it?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762570713
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +94,49 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Value: &pathRule.Path,
Review comment:
currently, the apisix-ingress-controller will not validate all the ingress resource being created? Maybe valiate the ingress resource should be another feature.
On the other hand, a issue in kubernetes projects https://github.com/kubernetes/kubernetes/issues/90210
the validation was removed
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-987622827
@gxthrj @tao12345666333 need a review
I think the e2e failure has nothing to do with this pr
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-988423022
Thd code LGTM
I added the label of `do-not-merge/hold` to it because this feature is not planned to be in the v1.4 version.
Do you have a strong demand for this feature? @lxm
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6e7f685) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/f4708675c6304ad019881ad7e0ac7a0affd3e6bd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f470867) will **increase** coverage by `0.77%`.
> The diff coverage is `74.19%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.28% 33.05% +0.77%
==========================================
Files 66 65 -1
Lines 6808 6876 +68
==========================================
+ Hits 2198 2273 +75
+ Misses 4353 4344 -9
- Partials 257 259 +2
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `71.12% <74.19%> (+2.28%)` | :arrow_up: |
| [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9lMmUvZTJlLmdv) | | |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
| [pkg/apisix/route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9yb3V0ZS5nbw==) | `38.92% <0.00%> (+2.01%)` | :arrow_up: |
| [pkg/apisix/cluster.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9jbHVzdGVyLmdv) | `33.33% <0.00%> (+3.30%)` | :arrow_up: |
| ... and [1 more](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f470867...6e7f685](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-986156768
> In addition, can you please add documentation to introduce this feature?
sure.
Because `exprs` is complex, more configurations may be added in the future.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f0f5775) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/1bbadf0d8e6aefeb11e55ab0d7230547d3c06135?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1bbadf0) will **increase** coverage by `0.49%`.
> The diff coverage is `80.76%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.42% 32.91% +0.49%
==========================================
Files 65 65
Lines 6872 6929 +57
==========================================
+ Hits 2228 2281 +53
- Misses 4396 4397 +1
- Partials 248 251 +3
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `73.16% <80.76%> (+4.32%)` | :arrow_up: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `21.03% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1bbadf0...f0f5775](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762696561
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +94,49 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Value: &pathRule.Path,
Review comment:
ok
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-983463848
> We may also add some test cases.
have written more test cases.
retested the feature
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r761098777
##########
File path: pkg/kube/translation/annotations/types.go
##########
@@ -18,6 +18,10 @@ import (
"strings"
)
+const (
+ AnnotationsPrefix = "k8s.apisix.apache.org/"
Review comment:
done
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-988431614
> Thd code LGTM
>
> I added the label of `do-not-merge/hold` to it because this feature is not planned to be in the v1.4 version.
>
> Do you have a strong demand for this feature? @lxm
right, I want to use apisix-ingress-controller to replace the nginx-ingress-controller
without this feature, this can not be done.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c6e665e) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0c6de2deb92c72b8d609490283c930a068df7d23?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c6de2d) will **increase** coverage by `0.19%`.
> The diff coverage is `74.19%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.07% 32.27% +0.19%
==========================================
Files 65 65
Lines 6943 7012 +69
==========================================
+ Hits 2227 2263 +36
- Misses 4466 4483 +17
- Partials 250 266 +16
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `71.12% <74.19%> (+2.28%)` | :arrow_up: |
| [pkg/apisix/plugin.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9wbHVnaW4uZ28=) | `80.00% <0.00%> (-20.00%)` | :arrow_down: |
| [pkg/apisix/cluster.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9jbHVzdGVyLmdv) | `30.02% <0.00%> (-3.31%)` | :arrow_down: |
| [pkg/apisix/route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9yb3V0ZS5nbw==) | `36.91% <0.00%> (-2.02%)` | :arrow_down: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0c6de2d...c6e665e](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762553776
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +94,49 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Value: &pathRule.Path,
Review comment:
>
Even it comes from the Ingress, we still have to validate it before translating, or it cannot be used by APISIX.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] gxthrj commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
gxthrj commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762746893
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -29,16 +29,23 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/id"
apisixv12 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v1"
+ configv2alpha1 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
Review comment:
Please merge master, the `v2alpha1` no longer exist, use `v2beta3` instead.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-987688535
> re-run all jobs.
E2E tests failed with "check the ingress lb status is updated" this time, maybe something wrong with test cases. I can pass this case with single run in a private environment.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r760700157
##########
File path: pkg/kube/translation/annotations/types.go
##########
@@ -18,6 +18,10 @@ import (
"strings"
)
+const (
+ AnnotationsPrefix = "k8s.apisix.apache.org/"
Review comment:
OK, let's add some comments for exportable constants.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (22526a9) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0c6de2deb92c72b8d609490283c930a068df7d23?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c6de2d) will **increase** coverage by `0.49%`.
> The diff coverage is `80.76%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.07% 32.57% +0.49%
==========================================
Files 65 65
Lines 6943 7000 +57
==========================================
+ Hits 2227 2280 +53
- Misses 4466 4467 +1
- Partials 250 253 +3
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `73.16% <80.76%> (+4.32%)` | :arrow_up: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0c6de2d...22526a9](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a01a4fd) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0c6de2deb92c72b8d609490283c930a068df7d23?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c6de2d) will **increase** coverage by `0.49%`.
> The diff coverage is `80.76%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.07% 32.57% +0.49%
==========================================
Files 65 65
Lines 6943 7000 +57
==========================================
+ Hits 2227 2280 +53
- Misses 4466 4467 +1
- Partials 250 253 +3
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `73.16% <80.76%> (+4.32%)` | :arrow_up: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0c6de2d...a01a4fd](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-985996122
In addition, can you please add documentation to introduce this feature?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r759791796
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +90,52 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeExact {
+ uris = append(uris, pathRule.Path)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Set: []string{},
Review comment:
We don't initialize this field.
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -266,29 +319,52 @@ func (t *translator) translateIngressExtensionsV1beta1(ing *extensionsv1beta1.In
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == extensionsv1beta1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == extensionsv1beta1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == extensionsv1beta1.PathTypeExact {
+ uris = append(uris, pathRule.Path)
+ } else if *pathRule.PathType == extensionsv1beta1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Set: []string{},
Review comment:
Ditto.
##########
File path: pkg/kube/translation/annotations/types.go
##########
@@ -18,6 +18,10 @@ import (
"strings"
)
+const (
+ AnnotationsPrefix = "k8s.apisix.apache.org/"
Review comment:
Is this constant exported to the outside? If not, we can rename it to `annotationsPrefix`.
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -175,29 +203,52 @@ func (t *translator) translateIngressV1beta1(ing *networkingv1beta1.Ingress) (*T
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1beta1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1beta1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1beta1.PathTypeExact {
+ uris = append(uris, pathRule.Path)
+ } else if *pathRule.PathType == networkingv1beta1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Set: []string{},
Review comment:
Ditto.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984335293
> > > We may also add some test cases.
> >
> >
> > have written more test cases. retested the feature
>
> By say adding test cases, we'd better also add the E2E test cases.
working on it.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1d0e27c) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0c6de2deb92c72b8d609490283c930a068df7d23?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c6de2d) will **increase** coverage by `0.49%`.
> The diff coverage is `80.76%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.07% 32.57% +0.49%
==========================================
Files 65 65
Lines 6943 7000 +57
==========================================
+ Hits 2227 2280 +53
- Misses 4466 4467 +1
- Partials 250 253 +3
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `73.16% <80.76%> (+4.32%)` | :arrow_up: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0c6de2d...1d0e27c](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (973d745) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/1bbadf0d8e6aefeb11e55ab0d7230547d3c06135?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1bbadf0) will **increase** coverage by `0.20%`.
> The diff coverage is `80.76%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.42% 32.63% +0.20%
==========================================
Files 65 65
Lines 6872 6929 +57
==========================================
+ Hits 2228 2261 +33
- Misses 4396 4410 +14
- Partials 248 258 +10
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `73.16% <80.76%> (+4.32%)` | :arrow_up: |
| [pkg/apisix/plugin.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9wbHVnaW4uZ28=) | `80.00% <0.00%> (-20.00%)` | :arrow_down: |
| [pkg/apisix/cluster.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9jbHVzdGVyLmdv) | `30.02% <0.00%> (-3.31%)` | :arrow_down: |
| [pkg/apisix/route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9yb3V0ZS5nbw==) | `36.91% <0.00%> (-2.02%)` | :arrow_down: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `21.03% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1bbadf0...973d745](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762646731
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +94,49 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Value: &pathRule.Path,
Review comment:
All right, that'd be unexpected, would you like to submit an issue? I think we can implement it in the future.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-986634421
> In addition, can you please add documentation to introduce this feature?
done for docs
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-987633377
re-run all jobs.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-988457214
ok I understand your situation, I have added it to v1.4.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-987855282
ping @tao12345666333 @gxthrj @lingsamuel
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762862781
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -29,16 +29,23 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/id"
apisixv12 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v1"
+ configv2alpha1 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
Review comment:
a lot of changes were made.
I've done the changes
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-985995871
Thanks! I have put it in my list.
PS: I will submit a PR to fix the problem of e2e failure (Ingress LB status case)
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (59786b8) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0c6de2deb92c72b8d609490283c930a068df7d23?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c6de2d) will **increase** coverage by `0.19%`.
> The diff coverage is `74.19%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.07% 32.27% +0.19%
==========================================
Files 65 65
Lines 6943 7012 +69
==========================================
+ Hits 2227 2263 +36
- Misses 4466 4483 +17
- Partials 250 266 +16
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `71.12% <74.19%> (+2.28%)` | :arrow_up: |
| [pkg/apisix/plugin.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9wbHVnaW4uZ28=) | `80.00% <0.00%> (-20.00%)` | :arrow_down: |
| [pkg/apisix/cluster.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9jbHVzdGVyLmdv) | `30.02% <0.00%> (-3.31%)` | :arrow_down: |
| [pkg/apisix/route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9yb3V0ZS5nbw==) | `36.91% <0.00%> (-2.02%)` | :arrow_down: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0c6de2d...59786b8](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-985498000
@tokers @tao12345666333 @lingsamuel @gxthrj
finally got the e2e testing work.
now, this PR needs a review again.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r762514537
##########
File path: pkg/kube/translation/ingress.go
##########
@@ -87,29 +94,49 @@ func (t *translator) translateIngressV1(ing *networkingv1.Ingress) (*TranslateCo
ctx.addUpstream(ups)
}
uris := []string{pathRule.Path}
- if pathRule.PathType != nil && *pathRule.PathType == networkingv1.PathTypePrefix {
- // As per the specification of Ingress path matching rule:
- // if the last element of the path is a substring of the
- // last element in request path, it is not a match, e.g. /foo/bar
- // matches /foo/bar/baz, but does not match /foo/barbaz.
- // While in APISIX, /foo/bar matches both /foo/bar/baz and
- // /foo/barbaz.
- // In order to be conformant with Ingress specification, here
- // we create two paths here, the first is the path itself
- // (exact match), the other is path + "/*" (prefix match).
- prefix := pathRule.Path
- if strings.HasSuffix(prefix, "/") {
- prefix += "*"
- } else {
- prefix += "/*"
+ var nginxVars []configv2alpha1.ApisixRouteHTTPMatchExpr
+ if pathRule.PathType != nil {
+ if *pathRule.PathType == networkingv1.PathTypePrefix {
+ // As per the specification of Ingress path matching rule:
+ // if the last element of the path is a substring of the
+ // last element in request path, it is not a match, e.g. /foo/bar
+ // matches /foo/bar/baz, but does not match /foo/barbaz.
+ // While in APISIX, /foo/bar matches both /foo/bar/baz and
+ // /foo/barbaz.
+ // In order to be conformant with Ingress specification, here
+ // we create two paths here, the first is the path itself
+ // (exact match), the other is path + "/*" (prefix match).
+ prefix := pathRule.Path
+ if strings.HasSuffix(prefix, "/") {
+ prefix += "*"
+ } else {
+ prefix += "/*"
+ }
+ uris = append(uris, prefix)
+ } else if *pathRule.PathType == networkingv1.PathTypeImplementationSpecific && useRegex {
+ nginxVars = append(nginxVars, configv2alpha1.ApisixRouteHTTPMatchExpr{
+ Subject: configv2alpha1.ApisixRouteHTTPMatchExprSubject{
+ Scope: configv2alpha1.ScopePath,
+ },
+ Op: configv2alpha1.OpRegexMatch,
+ Value: &pathRule.Path,
Review comment:
I think we should validate the regex pattern in the admission server.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (94550f8) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0c6de2deb92c72b8d609490283c930a068df7d23?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c6de2d) will **increase** coverage by `0.19%`.
> The diff coverage is `74.19%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.07% 32.27% +0.19%
==========================================
Files 65 65
Lines 6943 7012 +69
==========================================
+ Hits 2227 2263 +36
- Misses 4466 4483 +17
- Partials 250 266 +16
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `71.12% <74.19%> (+2.28%)` | :arrow_up: |
| [pkg/apisix/plugin.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9wbHVnaW4uZ28=) | `80.00% <0.00%> (-20.00%)` | :arrow_down: |
| [pkg/apisix/cluster.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9jbHVzdGVyLmdv) | `30.02% <0.00%> (-3.31%)` | :arrow_down: |
| [pkg/apisix/route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9yb3V0ZS5nbw==) | `36.91% <0.00%> (-2.02%)` | :arrow_down: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0c6de2d...94550f8](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (33dd6c4) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/0c6de2deb92c72b8d609490283c930a068df7d23?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c6de2d) will **increase** coverage by `0.49%`.
> The diff coverage is `80.76%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.07% 32.57% +0.49%
==========================================
Files 65 65
Lines 6943 7000 +57
==========================================
+ Hits 2227 2280 +53
- Misses 4466 4467 +1
- Partials 250 253 +3
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `73.16% <80.76%> (+4.32%)` | :arrow_up: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `19.43% <0.00%> (+0.33%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [26d5c5c...33dd6c4](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-984603700
# [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#779](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1faf7cf) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/1bbadf0d8e6aefeb11e55ab0d7230547d3c06135?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1bbadf0) will **increase** coverage by `0.49%`.
> The diff coverage is `80.76%`.
[](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #779 +/- ##
==========================================
+ Coverage 32.42% 32.91% +0.49%
==========================================
Files 65 65
Lines 6872 6929 +57
==========================================
+ Hits 2228 2281 +53
- Misses 4396 4397 +1
- Partials 248 251 +3
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/kube/translation/annotations/cors.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvY29ycy5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/iprestriction.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvaXByZXN0cmljdGlvbi5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/redirect.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmVkaXJlY3QuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/rewrite.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvcmV3cml0ZS5nbw==) | `0.00% <ø> (ø)` | |
| [pkg/kube/translation/annotations/types.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvdHlwZXMuZ28=) | `100.00% <ø> (ø)` | |
| [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | `73.16% <80.76%> (+4.32%)` | :arrow_up: |
| [pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv) | `21.03% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1bbadf0...1faf7cf](https://codecov.io/gh/apache/apisix-ingress-controller/pull/779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on a change in pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on a change in pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#discussion_r759835430
##########
File path: pkg/kube/translation/annotations/types.go
##########
@@ -18,6 +18,10 @@ import (
"strings"
)
+const (
+ AnnotationsPrefix = "k8s.apisix.apache.org/"
Review comment:
this will be used in `translation` package to dicide whether use-regex annotation is true
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] lxm commented on pull request #779: feat: support regex in path
Posted by GitBox <gi...@apache.org>.
lxm commented on pull request #779:
URL: https://github.com/apache/apisix-ingress-controller/pull/779#issuecomment-987688535
> re-run all jobs.
E2E tests failed with "check the ingress lb status is updated" this time, maybe something wrong with test cases. I can pass this case singly in a private environment.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org