Package org.cdk8s.plus25.k8s
Class IngressSpec.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.IngressSpec.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<IngressSpec>
- Enclosing interface:
- IngressSpec
@Stability(Stable) public static final class IngressSpec.Builder extends Object implements software.amazon.jsii.Builder<IngressSpec>
A builder forIngressSpec
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IngressSpecbuild()Builds the configured instance.IngressSpec.BuilderdefaultBackend(IngressBackend defaultBackend)Sets the value ofIngressSpec.getDefaultBackend()IngressSpec.BuilderingressClassName(String ingressClassName)Sets the value ofIngressSpec.getIngressClassName()IngressSpec.Builderrules(List<? extends IngressRule> rules)Sets the value ofIngressSpec.getRules()IngressSpec.Buildertls(List<? extends IngressTls> tls)Sets the value ofIngressSpec.getTls()
-
-
-
Method Detail
-
defaultBackend
@Stability(Stable) public IngressSpec.Builder defaultBackend(IngressBackend defaultBackend)
Sets the value ofIngressSpec.getDefaultBackend()- Parameters:
defaultBackend- DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.- Returns:
this
-
ingressClassName
@Stability(Stable) public IngressSpec.Builder ingressClassName(String ingressClassName)
Sets the value ofIngressSpec.getIngressClassName()- Parameters:
ingressClassName- IngressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although thekubernetes.io/ingress.classannotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.- Returns:
this
-
rules
@Stability(Stable) public IngressSpec.Builder rules(List<? extends IngressRule> rules)
Sets the value ofIngressSpec.getRules()- Parameters:
rules- A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.- Returns:
this
-
tls
@Stability(Stable) public IngressSpec.Builder tls(List<? extends IngressTls> tls)
Sets the value ofIngressSpec.getTls()- Parameters:
tls- TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.- Returns:
this
-
build
@Stability(Stable) public IngressSpec build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<IngressSpec>- Returns:
- a new instance of
IngressSpec - Throws:
NullPointerException- if any required attribute was not provided
-
-