KubernetesHelmChartResource
namespace Aspire.Hosting.Kubernetes;
public sealed class KubernetesHelmChartResource : Aspire.Hosting.ApplicationModel.Resource, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithParent, Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.Kubernetes.KubernetesEnvironmentResource>{ // ...}Remarks
Section titled Remarks Create a Helm chart resource using Kubernetes and configure it with values using Kubernetes.
At deploy time, the chart is installed via helm upgrade - as a pipeline step that runs after the main application Helm chart is deployed. The chart is installed into the specified namespace (defaulting to the chart name).
By default, an external Helm chart is not uninstalled by aspire destroy. Opt in to destroy-time uninstall by calling Kubernetes.
Constructors1
Section titled ConstructorsKubernetesHelmChartResource . Properties5
Section titled Propertiesstringoci://quay.io/jetstack/charts/cert-manager ) or a chart name from an added repository. Namespaceget; setstring?Examples
Section titled Examplesvar k8s = builder.AddKubernetesEnvironment("k8s");
// Install NGINX Ingress Controller from OCI registryk8s.AddHelmChart("nginx", "oci://ghcr.io/nginx/charts/nginx-ingress", "1.5.0");
// Install cert-manager with custom valuesk8s.AddHelmChart("cert-manager", "oci://quay.io/jetstack/charts/cert-manager", "1.17.0") .WithHelmValue("crds.enabled", "true") .WithHelmValue("config.enableGatewayAPI", "true");