apisix-ingress-controller icon indicating copy to clipboard operation
apisix-ingress-controller copied to clipboard

feat: add externalname support for upstream

Open elvis-cai opened this issue 2 years ago • 14 comments

Please answer these questions before submitting a pull request

  • Why submit this pull request?

  • [ ] Bugfix

  • [x] New feature provided

  • [ ] Improve performance

  • [ ] Backport patches

  • Related issues https://github.com/apache/apisix-ingress-controller/issues/645


Bugfix

  • Description

  • How to fix?


New feature or improvement

  • Describe the details and related test reports.
    • Adding kubernetes service type ExternalName support
    • For kind: ApisixUpstream, add two more options passHost and upstreamHost

Let me know if there's anything missing here, thanks.


Backport patches

  • Why need to backport?

  • Source branch

  • Related commits and pull requests

  • Target branch

elvis-cai avatar Oct 27 '21 23:10 elvis-cai

@elvis-cai Please add some test cases to cover these changes.

tokers avatar Nov 08 '21 03:11 tokers

@elvis-cai Please add some test cases to cover these changes.

sure, doc & test added.

elvis-cai avatar Nov 10 '21 23:11 elvis-cai

Codecov Report

Merging #726 (12563f5) into master (b127ff4) will decrease coverage by 0.12%. The diff coverage is 67.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #726      +/-   ##
==========================================
- Coverage   32.50%   32.37%   -0.13%     
==========================================
  Files          66       66              
  Lines        6800     6836      +36     
==========================================
+ Hits         2210     2213       +3     
- Misses       4340     4362      +22     
- Partials      250      261      +11     
Impacted Files Coverage Δ
pkg/kube/translation/translator.go 47.32% <55.55%> (+1.24%) :arrow_up:
pkg/kube/translation/util.go 32.16% <58.82%> (-0.56%) :arrow_down:
pkg/kube/translation/apisix_upstream.go 83.33% <88.23%> (+0.38%) :arrow_up:
pkg/apisix/plugin.go 80.00% <0.00%> (-20.00%) :arrow_down:
pkg/apisix/cluster.go 30.02% <0.00%> (-3.31%) :arrow_down:
pkg/apisix/route.go 36.91% <0.00%> (-2.02%) :arrow_down:

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 b127ff4...12563f5. Read the comment docs.

codecov-commenter avatar Nov 11 '21 00:11 codecov-commenter

Please fix the CI errors.

my bad, last commit forget to update test code, updated

elvis-cai avatar Nov 14 '21 23:11 elvis-cai

Sorry for delay. Can you resolve the conflict? Then we run the test and merge this PR. Thanks!

tao12345666333 avatar Nov 24 '21 12:11 tao12345666333

Sorry for delay. Can you resolve the conflict? Then we run the test and merge this PR. Thanks!

all good, conflict resolved and feel free to rerun the test, thanks.

elvis-cai avatar Nov 24 '21 23:11 elvis-cai

@tokers @tao12345666333 Why this feature not merge to master, Can you go ahead to process this feature ?

purekeeper avatar Mar 12 '22 07:03 purekeeper

There are too many conflicts to resolve.

tao12345666333 avatar Mar 12 '22 07:03 tao12345666333

@elvis-cai Could you merge the newest master branch? Thanks!

tokers avatar Mar 12 '22 08:03 tokers

This looks like a great feature and I'm really looking forward to having it merged. Is there something I can do to help move it along?

BrandonArp avatar May 11 '22 15:05 BrandonArp

I am more looking forward to the feature https://github.com/apache/apisix-ingress-controller/issues/927, but sounds good to me , before that's implemented, will look at if I could fix the conflict and merge the latest master branch.

elvis-cai avatar May 12 '22 04:05 elvis-cai

@tao12345666333 how does this look? I'd love to see this PR merged

BrandonArp avatar May 31 '22 02:05 BrandonArp

Just adding my +1 for this feature :)

NMichas avatar Jul 18 '22 06:07 NMichas

Sorry for delay reply. The maintenance team is actively working on the remainder tasks of the v1.5 release window. We plan to do a pre-release of v1.5 this month.

#726 #927 and some related tasks, I will put them in the v1.6 version to complete.

Currently we have too many things to do, including GitHub issues, PRs, some features and bugfixes, etc., and Slack channel replies. This leaves us almost at full capacity.

If anyone would like to see some new features added, please join us and help us make this project better, thanks

tao12345666333 avatar Jul 18 '22 14:07 tao12345666333

#1306 has been merged. I will close this one, thanks!

tao12345666333 avatar Nov 17 '22 08:11 tao12345666333

@tao12345666333 It looks like there's a discrepancy in the docs and what's actually possible when using the ApisixUpstream crd, i.e the passHost feature doesn't work- see https://github.com/apache/apisix-ingress-controller/issues/2010.

I'm not sure where the confusion happened but it looks like this pr would have added that feature, but #1306 was merged instead and does include passHostfunctionality?

mbuotidem avatar Nov 04 '23 21:11 mbuotidem