Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/frontend/src/content/docs/deployment/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Resource names in Kubernetes must follow DNS naming conventions. The integration

Use [external parameters](/fundamentals/external-parameters/) to configure values that differ between development and production environments.

### Helm chart metadata
### Helm chart options

By default, the Helm chart name is derived from your AppHost project. Use `WithHelm` to configure the chart name, version, and description:

Expand All @@ -166,9 +166,9 @@ var chartVersion = builder.AddParameter("chart-version");
builder.AddKubernetesEnvironment("k8s")
.WithHelm(helm =>
{
helm.WithChartName("my-aspire-app");
helm.WithChartVersion(chartVersion);
helm.WithChartDescription("My Aspire application Helm chart");
helm.WithChartName("my-aspire-app")
.WithChartVersion(chartVersion)
.WithChartDescription("My Aspire application Helm chart");
});
```
</TabItem>
Expand All @@ -181,6 +181,7 @@ const builder = await createBuilder();
const k8s = await builder.addKubernetesEnvironment('k8s');
await k8s.withHelm(async (helm) => {
await helm.withChartName('my-aspire-app');
await helm.withChartVersion('1.0.0');
await helm.withChartDescription('My Aspire application Helm chart');
});
```
Expand Down
24 changes: 19 additions & 5 deletions src/frontend/src/content/docs/integrations/compute/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,21 @@ await builder.build().run();
that define more than one. Otherwise, the `k8s` variable isn't required.
</Aside>

## Configure Helm settings
## Configure Helm chart options

Use `WithHelm` to customize Helm chart settings such as namespace, release name, and chart version:
You can configure the generated Helm chart using the `WithHelm` method, which provides a fluent `HelmChartOptions` builder:

<Tabs syncKey='aspire-lang'>
<TabItem id='csharp' label='C#'>
```csharp title="AppHost.cs"
builder.AddKubernetesEnvironment("k8s")
.WithHelm(helm =>
{
helm.WithNamespace("my-namespace");
helm.WithReleaseName("my-release");
helm.WithChartVersion("1.0.0");
helm.WithChartName("my-aspire-app")
.WithChartVersion("1.0.0")
.WithChartDescription("My Aspire application deployed to Kubernetes")
.WithReleaseName("my-release")
.WithNamespace("my-namespace");
});
```
</TabItem>
Expand All @@ -87,14 +89,26 @@ const k8s = await builder.addKubernetesEnvironment('k8s');
await k8s.withHelm(async (helm) => {
await helm.withNamespace('my-namespace');
await helm.withReleaseName('my-release');
await helm.withChartName('my-aspire-app');
await helm.withChartVersion('1.0.0');
await helm.withChartDescription('My Aspire application deployed to Kubernetes');
});
```
</TabItem>
</Tabs>

Helm is the default deployment engine. Call `WithHelm` only when you need to customize the defaults.

The `WithHelm` method is the single configuration entry point for Helm chart settings. The available options are:

| Method | Description |
|---|---|
| `WithChartName(string)` | Sets the Helm chart name (defaults to the application name). |
| `WithChartVersion(string)` | Sets the Helm chart version. Accepts a literal string or an Aspire parameter. |
| `WithChartDescription(string)` | Sets the description written into `Chart.yaml`. |
| `WithReleaseName(string)` | Sets the Helm release name used during deployment. |
| `WithNamespace(string)` | Sets the Kubernetes namespace for the deployment. |

## Configure a container registry

A vanilla Kubernetes cluster doesn't know which container registry to use for your application images. Use `AddContainerRegistry` and `WithContainerRegistry` to specify a registry that is accessible from both your local machine and from the cluster:
Expand Down
Loading