# KubernetesHelmChartResource

- Module: [Aspire.Hosting.Kubernetes](/reference/api/typescript/aspire.hosting.kubernetes.md)
- Version: `13.4.0-preview.1.26281.18`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

Represents an external Helm chart to be installed into a Kubernetes environment. This resource models a Helm chart from a repository (OCI or HTTP) that will be installed as a pipeline step after the main application Helm chart is deployed.

## Definition

```typescript
interface KubernetesHelmChartResource
  extends IResource,
    IResourceWithParent,
    KubernetesEnvironmentResource]] {
  withHelmChartDestroy(): KubernetesHelmChartResource;
  withHelmChartForceConflicts(): KubernetesHelmChartResource;
  withHelmChartNamespace(namespace: string): KubernetesHelmChartResource;
  withHelmChartReleaseName(releaseName: string): KubernetesHelmChartResource;
  withHelmValue(
      key: string,
      value: string): KubernetesHelmChartResource;
}
```

## Methods

- [withHelmChartDestroy](/reference/api/typescript/aspire.hosting.kubernetes/kuberneteshelmchartresource/withhelmchartdestroy.md) -- `method` -- Opts the Helm chart in to destroy-time uninstall. When set, `aspire destroy` will run `helm uninstall` for this release as part of the destroy pipeline.
    ```typescript
  withHelmChartDestroy(): KubernetesHelmChartResource
  ```
- [withHelmChartForceConflicts](/reference/api/typescript/aspire.hosting.kubernetes/kuberneteshelmchartresource/withhelmchartforceconflicts.md) -- `method` -- Opts the Helm chart in to `helm upgrade --install --force-conflicts`. When set, Helm's server-side apply forcibly takes over any fields owned by another field manager instead of failing with a conflict.
    ```typescript
  withHelmChartForceConflicts(): KubernetesHelmChartResource
  ```
- [withHelmChartNamespace](/reference/api/typescript/aspire.hosting.kubernetes/kuberneteshelmchartresource/withhelmchartnamespace.md) -- `method` -- Sets the Kubernetes namespace for the Helm chart installation. If not set, the namespace defaults to the chart resource name.
    ```typescript
  withHelmChartNamespace(namespace: string): KubernetesHelmChartResource
  ```
- [withHelmChartReleaseName](/reference/api/typescript/aspire.hosting.kubernetes/kuberneteshelmchartresource/withhelmchartreleasename.md) -- `method` -- Sets the Helm release name for the chart installation. If not set, the release name defaults to the resource name.
    ```typescript
  withHelmChartReleaseName(releaseName: string): KubernetesHelmChartResource
  ```
- [withHelmValue](/reference/api/typescript/aspire.hosting.kubernetes/kuberneteshelmchartresource/withhelmvalue.md) -- `method` -- Sets a Helm value for the chart installation. Values are passed to `helm upgrade --install` via `--set` flags.
    ```typescript
  withHelmValue(key: string, value: string): KubernetesHelmChartResource
  ```
