Package org.cdk8s.plus24.k8s
Class Endpoint.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.Endpoint.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Endpoint.Builder
addresses(List<String> addresses)
Sets the value ofEndpoint.getAddresses()
Endpoint
build()
Builds the configured instance.Endpoint.Builder
conditions(EndpointConditions conditions)
Sets the value ofEndpoint.getConditions()
Endpoint.Builder
deprecatedTopology(Map<String,String> deprecatedTopology)
Sets the value ofEndpoint.getDeprecatedTopology()
Endpoint.Builder
hints(EndpointHints hints)
Sets the value ofEndpoint.getHints()
Endpoint.Builder
hostname(String hostname)
Sets the value ofEndpoint.getHostname()
Endpoint.Builder
nodeName(String nodeName)
Sets the value ofEndpoint.getNodeName()
Endpoint.Builder
targetRef(ObjectReference targetRef)
Sets the value ofEndpoint.getTargetRef()
Endpoint.Builder
zone(String zone)
Sets the value ofEndpoint.getZone()
-
-
-
Method Detail
-
addresses
@Stability(Stable) public Endpoint.Builder addresses(List<String> addresses)
Sets the value ofEndpoint.getAddresses()
- Parameters:
addresses
- addresses of this endpoint. This parameter is required. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267- Returns:
this
-
conditions
@Stability(Stable) public Endpoint.Builder conditions(EndpointConditions conditions)
Sets the value ofEndpoint.getConditions()
- Parameters:
conditions
- conditions contains information about the current status of the endpoint.- Returns:
this
-
deprecatedTopology
@Stability(Stable) public Endpoint.Builder deprecatedTopology(Map<String,String> deprecatedTopology)
Sets the value ofEndpoint.getDeprecatedTopology()
- Parameters:
deprecatedTopology
- deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.- Returns:
this
-
hints
@Stability(Stable) public Endpoint.Builder hints(EndpointHints hints)
Sets the value ofEndpoint.getHints()
- Parameters:
hints
- hints contains information associated with how an endpoint should be consumed.- Returns:
this
-
hostname
@Stability(Stable) public Endpoint.Builder hostname(String hostname)
Sets the value ofEndpoint.getHostname()
- Parameters:
hostname
- hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.- Returns:
this
-
nodeName
@Stability(Stable) public Endpoint.Builder nodeName(String nodeName)
Sets the value ofEndpoint.getNodeName()
- Parameters:
nodeName
- nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.- Returns:
this
-
targetRef
@Stability(Stable) public Endpoint.Builder targetRef(ObjectReference targetRef)
Sets the value ofEndpoint.getTargetRef()
- Parameters:
targetRef
- targetRef is a reference to a Kubernetes object that represents this endpoint.- Returns:
this
-
zone
@Stability(Stable) public Endpoint.Builder zone(String zone)
Sets the value ofEndpoint.getZone()
- Parameters:
zone
- zone is the name of the Zone this endpoint exists in.- Returns:
this
-
build
@Stability(Stable) public Endpoint build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Endpoint>
- Returns:
- a new instance of
Endpoint
- Throws:
NullPointerException
- if any required attribute was not provided
-
-