Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support regex in path #779

Merged
merged 1 commit into from
Dec 8, 2021
Merged

Conversation

lxm
Copy link
Contributor

@lxm lxm commented Nov 30, 2021

Please answer these questions before submitting a pull request


New feature or improvement

  • support a new annotation k8s.apisix.apache.org/use-regex which to change path behavior using apisix's vars

Copy link
Contributor

@tokers tokers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may also add some test cases.

pkg/kube/translation/annotations/types.go Show resolved Hide resolved
pkg/kube/translation/ingress.go Outdated Show resolved Hide resolved
pkg/kube/translation/ingress.go Outdated Show resolved Hide resolved
pkg/kube/translation/ingress.go Outdated Show resolved Hide resolved
@lxm lxm force-pushed the feature/path-expr branch 2 times, most recently from ebd0747 to 6e7f685 Compare December 1, 2021 09:41
@lxm
Copy link
Contributor Author

lxm commented Dec 1, 2021

We may also add some test cases.

have written more test cases.
retested the feature

@lxm lxm requested a review from tokers December 1, 2021 12:41
@tokers
Copy link
Contributor

tokers commented Dec 2, 2021

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.

@lxm
Copy link
Contributor Author

lxm commented Dec 2, 2021

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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2021

Codecov Report

Merging #779 (f0f5775) into master (1bbadf0) will increase coverage by 0.49%.
The diff coverage is 80.76%.

Impacted file tree graph

@@            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 Coverage Δ
pkg/kube/translation/annotations/cors.go 100.00% <ø> (ø)
pkg/kube/translation/annotations/iprestriction.go 100.00% <ø> (ø)
pkg/kube/translation/annotations/redirect.go 0.00% <ø> (ø)
pkg/kube/translation/annotations/rewrite.go 0.00% <ø> (ø)
pkg/kube/translation/annotations/types.go 100.00% <ø> (ø)
pkg/kube/translation/ingress.go 73.16% <80.76%> (+4.32%) ⬆️
pkg/kube/translation/apisix_route.go 21.03% <0.00%> (+0.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bbadf0...f0f5775. Read the comment docs.

@lxm lxm force-pushed the feature/path-expr branch 10 times, most recently from 1d0e27c to 33dd6c4 Compare December 3, 2021 12:56
@lxm
Copy link
Contributor Author

lxm commented Dec 3, 2021

@tokers @tao12345666333 @lingsamuel @gxthrj

finally got the e2e testing work.
now, this PR needs a review again.

@tao12345666333
Copy link
Member

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)

@tao12345666333 tao12345666333 added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Dec 4, 2021
@tao12345666333
Copy link
Member

In addition, can you please add documentation to introduce this feature?

@tao12345666333 tao12345666333 linked an issue Dec 4, 2021 that may be closed by this pull request
@lxm
Copy link
Contributor Author

lxm commented Dec 5, 2021

In addition, can you please add documentation to introduce this feature?

sure.
Because exprs is complex, more configurations may be added in the future.

@@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge master, the v2alpha1 no longer exist, use v2beta3 instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot of changes were made.
I've done the changes

@lxm lxm force-pushed the feature/path-expr branch 2 times, most recently from fbadc91 to 1faf7cf Compare December 6, 2021 10:03
@lxm
Copy link
Contributor Author

lxm commented Dec 6, 2021

In addition, can you please add documentation to introduce this feature?

done for docs

Signed-off-by: lxm <lxm.xupt@gmail.com>
@lxm
Copy link
Contributor Author

lxm commented Dec 7, 2021

@gxthrj @tao12345666333 need a review

I think the e2e failure has nothing to do with this pr

@tao12345666333
Copy link
Member

re-run all jobs.

@lxm
Copy link
Contributor Author

lxm commented Dec 7, 2021

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.

@lxm
Copy link
Contributor Author

lxm commented Dec 7, 2021

ping @tao12345666333 @gxthrj @lingsamuel

Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tao12345666333
Copy link
Member

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

@lxm
Copy link
Contributor Author

lxm commented Dec 8, 2021

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.

@tao12345666333 tao12345666333 added changelog Issues with this label should be added to changelog when public a new release and removed do-not-merge/hold labels Dec 8, 2021
@tao12345666333 tao12345666333 added this to In progress in v1.4 Planning via automation Dec 8, 2021
@tao12345666333 tao12345666333 added this to the 1.4.0 milestone Dec 8, 2021
@tao12345666333
Copy link
Member

ok I understand your situation, I have added it to v1.4.

@tao12345666333 tao12345666333 merged commit 4e84eb8 into apache:master Dec 8, 2021
v1.4 Planning automation moved this from In progress to Done Dec 8, 2021
Sindweller pushed a commit to Sindweller/apisix-ingress-controller that referenced this pull request Dec 18, 2021
tao12345666333 pushed a commit to tao12345666333/ingress-controller that referenced this pull request Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Issues with this label should be added to changelog when public a new release enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

request help: path like /api/*/action
5 participants