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: add service discovery config #2081

Merged
merged 13 commits into from
Aug 31, 2021

Conversation

bzp2010
Copy link
Contributor

@bzp2010 bzp2010 commented Aug 20, 2021

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

This PR introduces UI based service discovery configuration.

Related issues

resolve: #1977 #1989

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@bzp2010 bzp2010 added enhancement New feature or request frontend labels Aug 20, 2021
@bzp2010 bzp2010 added this to the 2.7.2 milestone Aug 20, 2021
@bzp2010 bzp2010 self-assigned this Aug 20, 2021
@netlify
Copy link

netlify bot commented Aug 20, 2021

✔️ Deploy Preview for apisix-dashboard ready!

🔨 Explore the source changes: e3c2735

🔍 Inspect the deploy log: https://app.netlify.com/sites/apisix-dashboard/deploys/612c4765475f75000710a545

😎 Browse the preview: https://deploy-preview-2081--apisix-dashboard.netlify.app/

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2021

Codecov Report

Merging #2081 (e3c2735) into master (28bca96) will increase coverage by 2.26%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2081      +/-   ##
==========================================
+ Coverage   68.80%   71.07%   +2.26%     
==========================================
  Files         181       60     -121     
  Lines        7005     3779    -3226     
  Branches      787        0     -787     
==========================================
- Hits         4820     2686    -2134     
+ Misses       1901      809    -1092     
  Partials      284      284              
Flag Coverage Δ
backend-e2e-test 47.34% <ø> (+0.02%) ⬆️
backend-e2e-test-ginkgo 49.19% <ø> (+0.34%) ⬆️
backend-unit-test 52.98% <ø> (ø)
frontend-e2e-test ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/internal/core/entity/entity.go 100.00% <ø> (ø)
api/internal/handler/data_loader/route_export.go 75.00% <0.00%> (ø)
web/src/pages/PluginTemplate/Create.tsx
web/src/components/PanelSection/index.tsx
...src/pages/SSL/components/CertificateForm/index.tsx
.../src/pages/Route/components/Step1/ProxyRewrite.tsx
web/src/pages/Service/service.ts
...ages/Route/components/Step2/RequestRewriteView.tsx
...eb/src/components/Upstream/components/TimeUnit.tsx
...ream/components/active-check/Healthy/Successes.tsx
... and 109 more

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 28bca96...e3c2735. Read the comment docs.

@bzp2010 bzp2010 marked this pull request as ready for review August 21, 2021 16:35
@bzp2010
Copy link
Contributor Author

bzp2010 commented Aug 22, 2021

Update

  • complete function development
  • add E2E tests that directly create upstream and create upstream in route

@liuxiran
Copy link
Contributor

Request help @bzp2010 @tzssangglass @spacewander

please help me to make sure when we configure service discovery, can we configure these fields? Since I have not fond the related examples, and some of the fields such as timeouts configured in the yaml file

image

@bzp2010
Copy link
Contributor Author

bzp2010 commented Aug 23, 2021

image
Hi, @liuxiran. According to the schema, there is no difference except that the fields in the box are one of two.

@liuxiran
Copy link
Contributor

liuxiran commented Aug 23, 2021

please pay attention to

It should be noted that, when discovery_type choose nacos, discovery_args can be configured, see: https://apisix.apache.org/docs/apisix/2.7/discovery/nacos#discovery_args for details.

when choose nacos as service_type, discovery_args can be configured

@bzp2010
Copy link
Contributor Author

bzp2010 commented Aug 23, 2021

please pay attention to

It should be noted that, when discovery_type choose nacos, discovery_args can be configured, see: https://apisix.apache.org/docs/apisix/2.7/discovery/nacos#discovery_args for details.

when choose nacos as service_type, discovery_args can be configured

I ignored the params and I will improve it immediately.

Copy link
Contributor

@liuxiran liuxiran left a comment

Choose a reason for hiding this comment

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

LGTM

@nic-chen nic-chen requested a review from LiteSun August 25, 2021 06:52
@liuxiran
Copy link
Contributor

also cc @Baoyuantop @foolwc @iamayushdas to review, thanks very much

@iamayushdas
Copy link
Contributor

LGTM

@bzp2010 bzp2010 requested a review from LiteSun August 30, 2021 05:23
@bzp2010
Copy link
Contributor Author

bzp2010 commented Aug 30, 2021

@LiteSun The problem has been modified. Please review it again. Thanks.

Copy link
Member

@LiteSun LiteSun left a comment

Choose a reason for hiding this comment

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

LGTM

@bzp2010 bzp2010 merged commit 9764dad into apache:master Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: dashboard supports selecting: Service Discovery when creating an upstream
7 participants