microsoft / microsoft/aspire

WithRemoteImageName and WithRemoteImageTag methods not applied to published Helm chart

Open
#16,832 1 comment 2 reactions 0 assignees View on GitHub
area-deployment
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Description
**AI-assisted issue report: This issue was created with assistance from an AI coding agent.**

Using the `WithRemoteImageName` and `WithRemoteImageTag` methods on container resources doesn't seem to work. The resulting resource in the published Helm chart via `aspire publish` still contains the original image name.

## Reproduction
Sample apphost.cs:
```csharp
#:package Aspire.Hosting.Azure.Kubernetes@13.4.0-preview.1.26256.2
#:sdk Aspire.AppHost.Sdk@13.4.0-preview.1.26256.2

var builder = DistributedApplication.CreateBuilder(args);
var whoami = builder.AddContainer("whoami", "traefik/whoami");

#pragma warning disable ASPIREPIPELINES003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
whoami
.WithRemoteImageName("myCustomImageName")
.WithRemoteImageTag("myCustomImageTag");
#pragma warning restore ASPIREPIPELINES003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

builder.AddKubernetesEnvironment("k8s");

builder.Build().Run();
```

## Expected Behavior
The Helm chart deployment.yaml should use the custom image name and tag specified via `WithRemoteImageName` and `WithRemoteImageTag`.

## Actual Behavior
After running `aspire publish -o publish`, the generated Kubernetes deployment template still contains the original image:
```yaml
- image: "traefik/whoami:latest"
```

Instead of the expected custom image:
```yaml
- image: "myCustomImageName:myCustomImageTag"
```

## Aspire Doctor

Aspire Environment Check
========================

.NET SDK
✅ .NET 11.0.100-preview.3.26207.106 installed (x64)

Container Runtime
✅ Podman v5.8.1: running (auto-detected (only runtime running)) ← active

Environment
✅ HTTPS development certificate is trusted

Summary: 3 passed, 0 warnings, 0 failed**

Aspire version used: `13.4.0-preview.1.26256.2+6bf50345e1c4dfd3d45ca62af81749003175e5ee`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.