# HelmChartOptions Methods

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md)
- Kind: `Methods`
- Members: `6`

Provides options for configuring Helm chart deployment settings on a [KubernetesEnvironmentResource](/reference/api/csharp/aspire.hosting.kubernetes/kubernetesenvironmentresource.md).

## WithChartVersion(string)

- Name: `WithChartVersion(string)`
- Returns: [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/HelmChartOptions.cs)

Sets the Helm chart version for deployment.

```csharp
public sealed class HelmChartOptions
{
    public HelmChartOptions WithChartVersion(
        string version)
    {
        // ...
    }
}
```

## Parameters

- `version` (`string`)
  The chart version (e.g., "1.0.0").

## Returns

[HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) -- This [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) for chaining.

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## WithChartVersion(IResourceBuilder<ParameterResource>)

- Name: `WithChartVersion(IResourceBuilder<ParameterResource>)`
- Returns: [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/HelmChartOptions.cs)

Sets the Helm chart version for deployment using a parameter that will be prompted at deploy time.

```csharp
public sealed class HelmChartOptions
{
    public HelmChartOptions WithChartVersion(
        IResourceBuilder<ParameterResource> version)
    {
        // ...
    }
}
```

## Parameters

- `version` (`IResourceBuilder<ParameterResource>`)
  A parameter resource builder for the chart version value.

## Returns

[HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) -- This [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) for chaining.

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## WithNamespace(string)

- Name: `WithNamespace(string)`
- Returns: [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/HelmChartOptions.cs)

Sets the target Kubernetes namespace for deployment.

```csharp
public sealed class HelmChartOptions
{
    public HelmChartOptions WithNamespace(
        string @namespace)
    {
        // ...
    }
}
```

## Parameters

- `namespace` (`string`)
  The namespace name.

## Returns

[HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) -- This [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) for chaining.

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## WithNamespace(IResourceBuilder<ParameterResource>)

- Name: `WithNamespace(IResourceBuilder<ParameterResource>)`
- Returns: [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/HelmChartOptions.cs)

Sets the target Kubernetes namespace for deployment using a parameter that will be prompted at deploy time.

```csharp
public sealed class HelmChartOptions
{
    public HelmChartOptions WithNamespace(
        IResourceBuilder<ParameterResource> @namespace)
    {
        // ...
    }
}
```

## Parameters

- `namespace` (`IResourceBuilder<ParameterResource>`)
  A parameter resource builder for the namespace value.

## Returns

[HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) -- This [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) for chaining.

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## WithReleaseName(string)

- Name: `WithReleaseName(string)`
- Returns: [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/HelmChartOptions.cs)

Sets the Helm release name for deployment.

```csharp
public sealed class HelmChartOptions
{
    public HelmChartOptions WithReleaseName(
        string releaseName)
    {
        // ...
    }
}
```

## Parameters

- `releaseName` (`string`)
  The release name.

## Returns

[HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) -- This [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) for chaining.

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.

## WithReleaseName(IResourceBuilder<ParameterResource>)

- Name: `WithReleaseName(IResourceBuilder<ParameterResource>)`
- Returns: [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/HelmChartOptions.cs)

Sets the Helm release name for deployment using a parameter that will be prompted at deploy time.

```csharp
public sealed class HelmChartOptions
{
    public HelmChartOptions WithReleaseName(
        IResourceBuilder<ParameterResource> releaseName)
    {
        // ...
    }
}
```

## Parameters

- `releaseName` (`IResourceBuilder<ParameterResource>`)
  A parameter resource builder for the release name value.

## Returns

[HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) -- This [HelmChartOptions](/reference/api/csharp/aspire.hosting.kubernetes/helmchartoptions.md) for chaining.

## ATS metadata

### Ignored by ATS

- Excluded from automatic Polyglot export.
