-
Notifications
You must be signed in to change notification settings - Fork 343
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
request help: configure backend service with external url. #645
Comments
cc @tokers @tao12345666333 if you have time. Do we have to do special processing on |
We still need to discuss the security of using |
@elvis-cai It seems that we don't handle the external service correctly, as it's also "headless".
Fix is simple, just adding another condition that the service type is not |
Also, PR's welcome! :) |
cool, thanks @tokers for pointing out the root cause of the issue 👍 , by looking at kong ingress controller, also could find a condition check for externalname https://github.com/Kong/kubernetes-ingress-controller/blob/main/internal/parser/parser.go#L377. |
Got it, would you like to submit a PR to optimize it? Thanks! |
kk, could have a look at this issue. Another thing maybe not related to ingress controller, I did another test using apisix admin api, looks like rewrite host header support was added in May(apache/apisix#4208), so I could access each node defined in upstream.nodes with its header separately. Here's the colde I test:
when hitting apisix gateway with header
here's the output when both apple and banana are runing:
|
relate to: apache/apisix#4906, w can discuss it there. |
Any updates? Also for other solutions, have you considered supporting the configuration of apisix service in ApisixRoute? |
Since apache/apisix#4906 issue is fixed, trying to test add Here comes to another question when have two nodes in the same apisix upstream, in k8s scenario, it is appending all endpoints to the list of node as code https://github.com/apache/apisix-ingress-controller/blob/master/pkg/kube/translation/translator.go#L238. However in my case, I would like to have two external urls falling in the same node list, more detailed example could be found in this gist https://gist.github.com/elvis-cai/368ea541d3b9b7c66a8757e5017286b9#file-gistfile1-txt-L21, comments are the yaml file to apply, the output will be two apisix upstreams created, not sure what is the best way to have banana and apple url in the same node list. |
It would be tough to do this as both the backend are outside of the Kubernetes cluster, unless we can write the backend address directly in the ApisixRoute resource. |
I've recently spent a lot of time understanding your actual needs and writing a detailed proposal. I'll post on the mailing list and GitHub later, and we'll discuss how to implement it. IIRC, this feature is not included in all current Ingress controller implementations. This will be a huge feature. |
This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions. |
For specific progress and detailed technical solutions, we can use #927 to track. I will close this one. Thanks I plan to be in two weeks. |
Issue description
Hi, trying to configure apisix ingress controller with multiple external url traffic splitting or failover, not sure if current approach is correct, if there's other workaround, please correct me, thanks.
Here's two features I am looking at:
bar.com
is down, apisix should point tofoo.com
as failoverbar.com
andfoo.com
are both active, traffic will be splitting to these two urls.After applying this file, I get
Warning ResourceSyncAborted 1s (x5 over 3s) ApisixIngress ApisixIngress synced failed, with error: conflict headless service and backend resolve granularity
, seems backend service could not betype: ExternalName
Environment
your apisix-ingress-controller version (output of
apisix-ingress-controller version --long
);deploy with this doc https://apisix.apache.org/docs/ingress-controller/deployments/gke/
version:
apache/apisix-ingress-controller:1.0.0
your Kubernetes cluster version (output of
kubectl version
);Server Version: version.Info{Major:"1", Minor:"19+", GitVersion:"v1.19.10-gke.1600", GitCommit:"7b8e568a7fb4c9d199c2ba29a5f7d76f6b4341c2", GitTreeState:"clean", BuildDate:"2021-05-07T09:18:53Z", GoVersion:"go1.15.10b5", Compiler:"gc", Platform:"linux/amd64"}
if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (
uname -a
).N/A
The text was updated successfully, but these errors were encountered: