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: upgrade ApisixRoute v2beta2 apiversion. #698

Merged
merged 22 commits into from
Oct 2, 2021

Conversation

tao12345666333
Copy link
Member

Notice:

  • remove spec.backend
  • remove spec.tcp

Signed-off-by: Jintao Zhang zhangjintao9020@gmail.com

Please answer these questions before submitting a pull request

  • Why submit this pull request?

  • Bugfix

  • New feature provided

  • Improve performance

  • Backport patches

  • Related issues

Closes #692


Bugfix

  • Description

  • How to fix?


New feature or improvement

  • Describe the details and related test reports.

Backport patches

  • Why need to backport?

  • Source branch

  • Related commits and pull requests

  • Target branch

**Notice:**

* remove `spec.backend`
* remove `spec.tcp`

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333
Copy link
Member Author

need to be done:

  • add new test cases cover this version.
  • update the document and no longer use related fields

@tokers
Copy link
Contributor

tokers commented Sep 29, 2021

I think we should try to generate crd from their data structure definition in the future, to avoid writing them by hands.

@tao12345666333
Copy link
Member Author

Yes, we have created an issue for tracking. #515 We can deal with it in the next version.

By the way, I suggest to unify the existing CRD apiversion in this project, which can reduce the learning cost of users and facilitate unified management.

@gxthrj
Copy link
Contributor

gxthrj commented Sep 29, 2021

@tao12345666333 there are still some lint errors.

@tao12345666333
Copy link
Member Author

yep. just edit on GitHub codespace. I will fix it ASAP

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2021

Codecov Report

Merging #698 (c3c9580) into master (736aba3) will decrease coverage by 1.18%.
The diff coverage is 0.00%.

❗ Current head c3c9580 differs from pull request most recent head 909f21f. Consider uploading reports for the commit 909f21f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #698      +/-   ##
==========================================
- Coverage   34.04%   32.86%   -1.19%     
==========================================
  Files          61       62       +1     
  Lines        6144     6369     +225     
==========================================
+ Hits         2092     2093       +1     
- Misses       3801     4025     +224     
  Partials      251      251              
Impacted Files Coverage Δ
pkg/config/config.go 86.44% <ø> (ø)
pkg/ingress/apisix_route.go 0.00% <0.00%> (ø)
pkg/ingress/controller.go 1.05% <0.00%> (-0.01%) ⬇️
pkg/ingress/status.go 0.00% <0.00%> (ø)
pkg/kube/translation/apisix_route.go 19.63% <0.00%> (-6.95%) ⬇️
pkg/kube/translation/translator.go 47.00% <ø> (ø)
pkg/kube/translation/util.go 32.71% <0.00%> (-7.14%) ⬇️
test/e2e/e2e.go 100.00% <0.00%> (ø)

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 736aba3...909f21f. Read the comment docs.

@gxthrj
Copy link
Contributor

gxthrj commented Sep 30, 2021

Please check lint error.

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Copy link
Member

@lingsamuel lingsamuel left a comment

Choose a reason for hiding this comment

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

LGTM, just fix linter errors

@tao12345666333
Copy link
Member Author

475183_apisix-service-e2e-test_9180", "error": "not found"}                                                                                                                           
panic: runtime error: invalid memory address or nil pointer dereference                                                                                                               
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x15fdb81]                                                                                                               
                                                                                                                                                                                      
goroutine 360 [running]:                                                                                                                                                              
github.com/apache/apisix-ingress-controller/pkg/kube/translation.(*translator).getServiceClusterIPAndPort(0xc0005e0080, 0x0, 0xc0009df7d0, 0x2a, 0xc00085cca8, 0x0, 0x0, 0x0, 0x0)    
        /build/pkg/kube/translation/util.go:38 +0x81                                                                                                                                  
github.com/apache/apisix-ingress-controller/pkg/kube/translation.(*translator).translateHTTPRoute(0xc0005e0080, 0xc0002b8e00, 0xc00015c128, 0x1cb4bee, 0x1cb4bee)                             /build/pkg/kube/translation/apisix_route.go:439 +0x860                                                                                                                        
github.com/apache/apisix-ingress-controller/pkg/kube/translation.(*translator).TranslateRouteV2alpha1(0xc0005e0080, 0xc00015c128, 0x1a, 0xc000a35c01, 0xd)
        /build/pkg/kube/translation/apisix_route.go:103 +0x7c                                                                                                                         github.com/apache/apisix-ingress-controller/pkg/ingress.(*apisixRouteController).sync(0xc0003e9980, 0x1fd6000, 0xc0005d2300, 0xc0006ea960, 0x1d69390, 0x0)
        /build/pkg/ingress/apisix_route.go:149 +0x1d9a                                                                                                                                
github.com/apache/apisix-ingress-controller/pkg/ingress.(*apisixRouteController).runWorker(0xc0003e9980, 0x1fd6000, 0xc0005d2300)                                                             /build/pkg/ingress/apisix_route.go:79 +0x57     
created by github.com/apache/apisix-ingress-controller/pkg/ingress.(*apisixRouteController).run              
        /build/pkg/ingress/apisix_route.go:68 +0x245         

when using v2alpha1 ApisixRoute to run e2e, I got a panic.

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333 tao12345666333 added the changelog Issues with this label should be added to changelog when public a new release label Sep 30, 2021
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333 tao12345666333 changed the title feat: upgrade ApisixRoute v2beta2 apiversion. [WIP] feat: upgrade ApisixRoute v2beta2 apiversion. Sep 30, 2021
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333 tao12345666333 changed the title [WIP] feat: upgrade ApisixRoute v2beta2 apiversion. feat: upgrade ApisixRoute v2beta2 apiversion. Oct 1, 2021
@tao12345666333
Copy link
Member Author

@gxthrj @tokers @lingsamuel PTAL
Thanks!

@tao12345666333 tao12345666333 added the enhancement New feature or request label Oct 1, 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
Projects
No open projects
v1.3 Planning
Awaiting triage
Development

Successfully merging this pull request may close these issues.

Breaking changes: deprecated the spec.backend field in ApisixRoute
5 participants