CertManagerResource
namespace Aspire.Hosting.Kubernetes;
public sealed class CertManagerResource : Aspire.Hosting.ApplicationModel.Resource, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithParent, Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.Kubernetes.KubernetesEnvironmentResource>{ // ...}Remarks
Section titled Remarks cert-manager is a Kubernetes add-on that provisions and renews X.509 certificates from sources such as Let's Encrypt. Aspire models cert-manager as a typed resource so that issuer resources ( CertManagerIssuerResource) can be parented to it and gateways/ingresses can reference issuers in a strongly-typed way via WithTls(issuer).
Under the covers, CertManagerExtensions.AddCertManager installs cert-manager using a KubernetesHelmChartResource pointed at the upstream oci://quay.io/jetstack/charts/cert-manager chart, with CRDs and Gateway API support enabled. The chart resource is registered in the model under "{name}-chart" (so the cert-manager wrapper itself can keep the natural "{name}" identifier) and is exposed via CertManagerResource.HelmChart for advanced configuration.
Constructors1
Section titled ConstructorsCertManagerResource(string, KubernetesEnvironmentResource, KubernetesHelmChartResource)CertManagerResource. Properties2
Section titled PropertiesHelmChartgetWithHelmChartValues or to inspect chart metadata. The chart name and version are fixed at construction time and cannot be changed through this property. ParentgetExamples
Section titled Examplesvar aks = builder.AddAzureKubernetesEnvironment("aks");var certManager = aks.AddCertManager("cert-manager");
var letsencrypt = certManager.AddIssuer("letsencrypt-prod") .WithLetsEncryptProduction("ops@contoso.com") .WithHttp01Solver();
aks.AddGateway("gw") .WithRoute("/api", api.GetEndpoint("http")) .WithTls(letsencrypt);