Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

KubernetesIngressResource.WithIngressAnnotation

Method
📦 Aspire.Hosting.Kubernetes v13.6.5-preview.1.26559.7
type KubernetesIngressResource interface {
// ... omitted for brevity
WithIngressAnnotation(
key string,
value string,
) KubernetesIngressResource
}

Signature

methodWithIngressAnnotationbuilder
Adds a Kubernetes metadata annotation to the generated Ingress resource. These are key-value pairs in the metadata.annotations field of the K8S Ingress, commonly used to configure ingress controller-specific behavior.
WithIngressAnnotation(
key string,
value string,
) KubernetesIngressResource
keystringThe annotation key (e.g., "nginx.ingress.kubernetes.io/rewrite-target").
valuestringThe annotation value.
KubernetesIngressResource

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: