Class ServiceProps.Jsii$Proxy
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus24.ServiceProps.Jsii$Proxy
-
- All Implemented Interfaces:
ResourceProps
,ServiceProps
,software.amazon.jsii.JsiiSerializable
- Enclosing interface:
- ServiceProps
@Stability(Stable) @Internal public static final class ServiceProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ServiceProps
An implementation forServiceProps
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.ServiceProps
ServiceProps.Builder, ServiceProps.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Jsii$Proxy(ServiceProps.Builder builder)
Constructor that initializes the object based on literal property values passed by theServiceProps.Builder
.protected
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNode
$jsii$toJson()
boolean
equals(Object o)
String
getClusterIP()
The IP address of the service and is usually assigned randomly by the master.List<String>
getExternalIPs()
A list of IP addresses for which nodes in the cluster will also accept traffic for this service.String
getExternalName()
The externalName to be used when ServiceType.EXTERNAL_NAME is set.List<String>
getLoadBalancerSourceRanges()
A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs.org.cdk8s.ApiObjectMetadata
getMetadata()
Metadata that all persisted resources must have, which includes all objects users must create.List<ServicePort>
getPorts()
The ports this service binds to.IPodSelector
getSelector()
Which pods should the service select and route to.ServiceType
getType()
Determines how the Service is exposed.int
hashCode()
-
-
-
Constructor Detail
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.- Parameters:
objRef
- Reference to the JSII managed object.
-
Jsii$Proxy
protected Jsii$Proxy(ServiceProps.Builder builder)
Constructor that initializes the object based on literal property values passed by theServiceProps.Builder
.
-
-
Method Detail
-
getClusterIP
public final String getClusterIP()
Description copied from interface:ServiceProps
The IP address of the service and is usually assigned randomly by the master.If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName.
Default: - Automatically assigned.
- Specified by:
getClusterIP
in interfaceServiceProps
- See Also:
- https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
-
getExternalIPs
public final List<String> getExternalIPs()
Description copied from interface:ServiceProps
A list of IP addresses for which nodes in the cluster will also accept traffic for this service.These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
Default: - No external IPs.
- Specified by:
getExternalIPs
in interfaceServiceProps
-
getExternalName
public final String getExternalName()
Description copied from interface:ServiceProps
The externalName to be used when ServiceType.EXTERNAL_NAME is set.Default: - No external name.
- Specified by:
getExternalName
in interfaceServiceProps
-
getLoadBalancerSourceRanges
public final List<String> getLoadBalancerSourceRanges()
Description copied from interface:ServiceProps
A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs.More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
- Specified by:
getLoadBalancerSourceRanges
in interfaceServiceProps
-
getPorts
public final List<ServicePort> getPorts()
Description copied from interface:ServiceProps
The ports this service binds to.If the selector of the service is a managed pod / workload, its ports will are automatically extracted and used as the default value. Otherwise, no ports are bound.
Default: - either the selector ports, or none.
- Specified by:
getPorts
in interfaceServiceProps
-
getSelector
public final IPodSelector getSelector()
Description copied from interface:ServiceProps
Which pods should the service select and route to.You can pass one of the following:
- An instance of
Pod
or any workload resource (e.gDeployment
,StatefulSet
, ...) - Pods selected by the
Pods.select
function. Note that in this case only labels can be specified.
Default: - unset, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify.
Example:
// select the pods of a specific deployment const backend = new kplus.Deployment(this, 'Backend', ...); new kplus.Service(this, 'Service', { selector: backend }); // select all pods labeled with the `tier=backend` label const backend = kplus.Pod.labeled({ tier: 'backend' }); new kplus.Service(this, 'Service', { selector: backend });
- Specified by:
getSelector
in interfaceServiceProps
- An instance of
-
getType
public final ServiceType getType()
Description copied from interface:ServiceProps
Determines how the Service is exposed.More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
Default: ServiceType.ClusterIP
- Specified by:
getType
in interfaceServiceProps
-
getMetadata
public final org.cdk8s.ApiObjectMetadata getMetadata()
Description copied from interface:ResourceProps
Metadata that all persisted resources must have, which includes all objects users must create.- Specified by:
getMetadata
in interfaceResourceProps
-
$jsii$toJson
@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
- Specified by:
$jsii$toJson
in interfacesoftware.amazon.jsii.JsiiSerializable
-
-