-
Notifications
You must be signed in to change notification settings - Fork 30
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
Feature Request: Support service discovery via app name #473
Comments
We are investigating the implementation and have plans to enable shortly. Thanks for the issue we have marked as roadmap |
Would be great to see some improvements here. For many coming from Kubernetes, it seems super strange needing to put an ingress in front of each container app, even for internal "pod to pod" calls. For most Kubernetes people, ingress means - exposing traffic outside the cluster I totally get that the deployment model for ACA is very different from true Kubernetes, perhaps it's just overloading on the term "ingress" |
see also ezYakaEagle442/aca-java-petclinic-mic-srv#1, it looks worse than what I thought : even using the FQDN as workaround, the UI is broken. |
…vironment.properties.defaultDomain as workaround for #1 & microsoft/azure-container-apps#473
finally fixed the routing using internal service with: String internalK8Ssvc2svcRoute = "http://" + System.getenv("CUSTOMERS_SVC_APP_NAME") + ".internal." + System.getenv("CONTAINER_APP_ENV_DNS_SUFFIX"); |
My 2 cents on this having migrated mostly from AKS to ACA in the last 30 days. The problem with building the URL using the name of the Container App is the Using the name of the app (analogous to the name of the service in AKS) would be okay but complicate TLS setup and also makes the assumption that all the apps are in the same Kubernetes namespace? I would much rather prefer (maybe it is just wish), that Azure made the internal domain name always functional so long as the ingress is enabled (internal or external) while the one without the |
the example: # 1. Create an external proxy app
$ az containerapp create \
--name squid-proxy \
--resource-group $RESOURCE_GROUP \
--environment $CONTAINERAPPS_ENVIRONMENT \
--image docker.io/ubuntu/squid:5.2-22.04_beta \
--transport tcp \
--target-port 3128 \
--exposed-port 3128 \
--ingress external \
--query properties.configuration.ingress.fqdn
> squid-proxy.bluesand-424eb2fe.westeu.azurecontainerapps.io
# 2. Create an external nginx app
$ az containerapp create \
--name nginx\
--resource-group $RESOURCE_GROUP \
--environment $CONTAINERAPPS_ENVIRONMENT \
--image nginx \
--target-port 80 \
--ingress external \
--query properties.configuration.ingress.fqdn
> nginx.bluesand-424eb2fe.westeu.azurecontainerapps.io
# through the proxy, both external and internal endpoints should be accessible
# external
$ curl -I --proxy squid-proxy.bluesand-424eb2fe.westeu.azurecontainerapps.io:3128 \
https://nginx.bluesand-424eb2fe.westeu.azurecontainerapps.io
> HTTP/1.1 200 Connection established
> HTTP/2 200
> server: nginx/1.23.2
> date: Thu, 10 Nov 2022 17:29:27 GMT
> content-type: text/html
> content-length: 615
> last-modified: Wed, 19 Oct 2022 07:56:21 GMT
> etag: "634fada5-267"
> accept-ranges: bytes
# internal
$ curl -I --proxy squid-proxy.bluesand-424eb2fe.westeu.azurecontainerapps.io:3128 \
https://nginx.internal.bluesand-424eb2fe.westeu.azurecontainerapps.io
> HTTP/1.1 200 Connection established
> HTTP/2 200
> server: nginx/1.23.2
> date: Thu, 10 Nov 2022 17:29:43 GMT
> content-type: text/html
> content-length: 615
> last-modified: Wed, 19 Oct 2022 07:56:21 GMT
> etag: "634fada5-267"
> accept-ranges: bytes
This is coming soon. Though you're right about the TLS issue. It'll be |
Roadmap issue: #605 |
This was very helpful. Perhaps this could be added to the docs: https://learn.microsoft.com/en-us/azure/container-apps/connect-apps? I had no idea I had to use ".internal" to reach an internal service which is not externally exposed. |
This should work now as expected. You can call http apps over |
I have been working on the developer experience in my own app. I use Steeltoe with Consul locally. The convention |
I was expecting this to work, but it does not: Yes, they are internal. So is it about the Where is the documentation? Update: |
Is your feature request related to a problem? Please describe.
The doc https://learn.microsoft.com/en-us/azure/container-apps/connect-apps?source=recommendations&tabs=bash describes that the only way connect microservices without Dapr is to get the App FQDN which breaks Apps migration when migrating an existing App to ACA.
see at https://github.com/ezYakaEagle442/aca-java-petclinic-mic-srv#understanding-the-spring-petclinic-application
Specifically required when deploying the Petclinic App to ACA ${} ${VETS_SVC_URL} ${} , ${VISITS_SVC_URL} , ${CUSTOMERS_SVC_URL} Environment variables have been configured in :
original code :
code update required to deploy Petclinic to ACA :
original code :
code update required to deploy Petclinic to ACA :
original code :
code update required to deploy Petclinic to ACA :
Those back-end URL have been set in the App through Bicep
Describe the solution you'd like.
To support App portability, ACA should expose the interna service through this URL pattern : http://${ACA_APP_NAME}
Describe alternatives you've considered.
The only option was to replace the URL http://mybackend by the https://${ACA endpoint}
Additional context.
this breaks the portability of any spring boot Apps, any other App using K8S internal service pattern when configuring URL through http://mybackend-service
@kendallroden @dariagrigoriu @torosent
The text was updated successfully, but these errors were encountered: