diff --git a/src/frontend/src/content/docs/deployment/kubernetes.mdx b/src/frontend/src/content/docs/deployment/kubernetes.mdx index ac96c2a67..34eeab6aa 100644 --- a/src/frontend/src/content/docs/deployment/kubernetes.mdx +++ b/src/frontend/src/content/docs/deployment/kubernetes.mdx @@ -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: @@ -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"); }); ``` @@ -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'); }); ``` diff --git a/src/frontend/src/content/docs/integrations/compute/kubernetes.mdx b/src/frontend/src/content/docs/integrations/compute/kubernetes.mdx index 29eca09e2..2ac23b9bc 100644 --- a/src/frontend/src/content/docs/integrations/compute/kubernetes.mdx +++ b/src/frontend/src/content/docs/integrations/compute/kubernetes.mdx @@ -65,9 +65,9 @@ await builder.build().run(); that define more than one. Otherwise, the `k8s` variable isn't required. -## 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: @@ -75,9 +75,11 @@ Use `WithHelm` to customize Helm chart settings such as namespace, release name, 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"); }); ``` @@ -87,7 +89,9 @@ 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'); }); ``` @@ -95,6 +99,16 @@ await k8s.withHelm(async (helm) => { 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: