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

Deploy eshop reference application fails with missing IdentityUrl configuration #252

Open
ivog opened this issue Aug 20, 2024 · 4 comments

Comments

@ivog
Copy link

ivog commented Aug 20, 2024

🔥 Bug Description

I'm trying to deploy the eshop reference application (https://github.com/dotnet/eShop) using aspirate to a kubernetes cluster on docker desktop for mac. The webapp and webhooksclient don't run because the identityurl configuration is missing. The identityurl config is present in the manifest.

Aspirate version: 8.0.7
Eshop commit: c83b770cc618b9b82355f40f0734951d9f74f15c

🔍 Steps to Reproduce the Bug

git clone https://github.com/dotnet/eShop.git
cd eShop/src/eShop.AppHost

aspirate generate
aspirate apply

@frankbolero
Copy link

I've been having this issue as well and temporarily solved it by editing the ConfigMap-files myself.

That being said it seems like the .WithEnvironment("Identity__Url", identityEndpoint) in the eShop Apphost aren't properly translated over to any of the ConfigMaps (basket-api, ordering-api, webhooks-api, webhooksclient, webapp). That's at least my uninitiated guess.

@rhodi2436
Copy link

rhodi2436 commented Aug 30, 2024

In fact, not only IdentityUrl, but also many configurations in the Aspire Manifest file do not take effect. For example, some environment variables, External tags.
Therefore, after using the tool to generate the k8s configuration file, you need to check it against the Aspire Manifest, add missing environment variables, and modify the external port mapping of some services (I asked gpt, and he suggested that I add webapp, dashboard, etc. that need external services spec.type is changed to NodePort)
After completing the above modifications, the eshop project can work normally and can be accessed on the host machine using localhost:<nodeport>.

@rhodi2436
Copy link

I believe that Aspire is just for local debugging of microservice applications. If you want to deploy the application, unless you use Azure, you need knowledge of the corresponding platform to solve compatibility issues.

@rhodi2436
Copy link

I found the cause of the problem, which is quite dramatic. The current version does not support https.

private static string HandleUrlBinding(string resourceName, string bindingName, Binding binding) =>
        bindingName switch
        {
            Literals.Http => $"{Literals.Http}://{resourceName}:{binding.TargetPort}",
            Literals.Https => string.Empty, // For now - disable https, only http is supported until we have a way to generate dev certs and inject into container for startup.
            _ => HandleCustomServicePortBinding(resourceName, binding),
        };

you can find this at Source Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@frankbolero @ivog @rhodi2436 and others