# KindHelmChartResourceBuilderExtensions Methods

- Package: [CommunityToolkit.Aspire.Hosting.Kind](/reference/api/csharp/communitytoolkit.aspire.hosting.kind.md)
- Type: [KindHelmChartResourceBuilderExtensions](/reference/api/csharp/communitytoolkit.aspire.hosting.kind/kindhelmchartresourcebuilderextensions.md)
- Kind: `Methods`
- Members: `5`

Extension methods for adding Helm chart resources to Kind clusters.

<a id="addhelmchart"></a>
<a id="addhelmchart-iresourcebuilder-kindclusterresource-string-string"></a>

## AddHelmChart(IResourceBuilder<KindClusterResource>, string, string)

- Name: `AddHelmChart(IResourceBuilder<KindClusterResource>, string, string)`
- Modifiers: `extension`
- Returns: `IResourceBuilder<KindHelmChartResource>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindHelmChartResourceBuilderExtensions.cs#L36-L114)

Adds a Helm chart to be deployed to the Kind cluster.

```csharp
public static class KindHelmChartResourceBuilderExtensions
{
    public static IResourceBuilder<KindHelmChartResource> AddHelmChart(
        this IResourceBuilder<KindClusterResource> builder,
        string name,
        string chartRef)
    {
        // ...
    }
}
```

## Parameters

- `builder` (`IResourceBuilder<KindClusterResource>`)
  The Kind cluster resource builder.
- `name` (`string`)
  The name of the Helm release.
- `chartRef` (`string`)
  Chart reference passed to `helm install`. Any form Helm supports: OCI ( `oci://registry/chart`), repo ( `repo/chart`), or local path ( `./charts/my-app`).

## Returns

`IResourceBuilder<KindHelmChartResource>` -- A reference to the `ApplicationModel.IResourceBuilder`1`.

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.

<a id="withchartversion"></a>
<a id="withchartversion-iresourcebuilder-kindhelmchartresource-string"></a>

## WithChartVersion(IResourceBuilder<KindHelmChartResource>, string)

- Name: `WithChartVersion(IResourceBuilder<KindHelmChartResource>, string)`
- Modifiers: `extension`
- Returns: `IResourceBuilder<KindHelmChartResource>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindHelmChartResourceBuilderExtensions.cs#L128-L132)

Sets the chart version (maps to `helm install --version`).

```csharp
public static class KindHelmChartResourceBuilderExtensions
{
    public static IResourceBuilder<KindHelmChartResource> WithChartVersion(
        this IResourceBuilder<KindHelmChartResource> builder,
        string version)
    {
        // ...
    }
}
```

## Parameters

- `builder` (`IResourceBuilder<KindHelmChartResource>`)
  The Helm chart resource builder.
- `version` (`string`)
  The chart version.

## Returns

`IResourceBuilder<KindHelmChartResource>` -- A reference to the `ApplicationModel.IResourceBuilder`1`.

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.

<a id="withhelmvalue"></a>
<a id="withhelmvalue-iresourcebuilder-kindhelmchartresource-string-string"></a>

## WithHelmValue(IResourceBuilder<KindHelmChartResource>, string, string)

- Name: `WithHelmValue(IResourceBuilder<KindHelmChartResource>, string, string)`
- Modifiers: `extension`
- Returns: `IResourceBuilder<KindHelmChartResource>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindHelmChartResourceBuilderExtensions.cs#L148-L153)

Sets a Helm value (maps to `helm install --set key=value`).

```csharp
public static class KindHelmChartResourceBuilderExtensions
{
    public static IResourceBuilder<KindHelmChartResource> WithHelmValue(
        this IResourceBuilder<KindHelmChartResource> builder,
        string key,
        string value)
    {
        // ...
    }
}
```

## Parameters

- `builder` (`IResourceBuilder<KindHelmChartResource>`)
  The Helm chart resource builder.
- `key` (`string`)
  The Helm value key.
- `value` (`string`)
  The Helm value.

## Returns

`IResourceBuilder<KindHelmChartResource>` -- A reference to the `ApplicationModel.IResourceBuilder`1`.

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.

<a id="withhelmvaluesfile"></a>
<a id="withhelmvaluesfile-iresourcebuilder-kindhelmchartresource-string"></a>

## WithHelmValuesFile(IResourceBuilder<KindHelmChartResource>, string)

- Name: `WithHelmValuesFile(IResourceBuilder<KindHelmChartResource>, string)`
- Modifiers: `extension`
- Returns: `IResourceBuilder<KindHelmChartResource>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindHelmChartResourceBuilderExtensions.cs#L167-L171)

Adds a values file (maps to `helm install -f path`).

```csharp
public static class KindHelmChartResourceBuilderExtensions
{
    public static IResourceBuilder<KindHelmChartResource> WithHelmValuesFile(
        this IResourceBuilder<KindHelmChartResource> builder,
        string path)
    {
        // ...
    }
}
```

## Parameters

- `builder` (`IResourceBuilder<KindHelmChartResource>`)
  The Helm chart resource builder.
- `path` (`string`)
  The path to the values file.

## Returns

`IResourceBuilder<KindHelmChartResource>` -- A reference to the `ApplicationModel.IResourceBuilder`1`.

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.

<a id="withnamespace"></a>
<a id="withnamespace-iresourcebuilder-t-string"></a>

## WithNamespace(IResourceBuilder<T>, string)

- Name: `WithNamespace(IResourceBuilder<T>, string)`
- Modifiers: `extension`
- Returns: `IResourceBuilder<T>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindHelmChartResourceBuilderExtensions.cs#L187-L191)

Sets the Kubernetes namespace for the deployment.

```csharp
public static class KindHelmChartResourceBuilderExtensions
{
    public static IResourceBuilder<T> WithNamespace<T>(
        this IResourceBuilder<T> builder,
        string @namespace)
    {
        // ...
    }
}
```

## Parameters

- `builder` (`IResourceBuilder<T>`)
  The resource builder.
- `namespace` (`string`)
  The Kubernetes namespace.

## Returns

`IResourceBuilder<T>` -- A reference to the `ApplicationModel.IResourceBuilder`1`.

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.
