prom3theu5 / aspirational-manifests

Handle deployments of .NET Aspire AppHost Projects
MIT License
702 stars 36 forks source link

status.podIP or equivalent when using Aspir8? #261

Open Jolurawa opened 1 month ago

Jolurawa commented 1 month ago

The services in my app need to have an environment variable for the binding address which I could usually set using something like this:

     - name: BindingAddress
        valueFrom:
          fieldRef:
            fieldPath: status.podIP

Is there a way to get Aspir8 to generate this kind of output?

I've tried setting the environment variable in Program.cs using .GetEndpoint("endpointName").Property(EndpointProperty.IPV4Host); and .WithEnvironment(x => x.EnvironmentVariables["BindingAddress"] = value) but that results in my binding address env var being set to the name of the resource rather than the actual ip address. Thanks