Class LoadBalancerService
- java.lang.Object
-
- org.apache.flink.kubernetes.kubeclient.services.ServiceType
-
- org.apache.flink.kubernetes.kubeclient.services.LoadBalancerService
-
public class LoadBalancerService extends ServiceType
The service type of LoadBalancer.
-
-
Field Summary
Fields Modifier and Type Field Description static LoadBalancerService
INSTANCE
-
Constructor Summary
Constructors Constructor Description LoadBalancerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.fabric8.kubernetes.api.model.Service
buildUpInternalService(KubernetesJobManagerParameters kubernetesJobManagerParameters)
Build up the internal service template, according to the jobManager parameters.Optional<Endpoint>
getRestEndpoint(io.fabric8.kubernetes.api.model.Service targetService, io.fabric8.kubernetes.client.NamespacedKubernetesClient internalClient, KubernetesConfigOptions.NodePortAddressType nodePortAddressType)
Gets the rest endpoint from the kubernetes service.int
getRestPort(io.fabric8.kubernetes.api.model.ServicePort port)
Gets the rest port from the service port.String
getType()
Gets the type of the target kubernetes service.-
Methods inherited from class org.apache.flink.kubernetes.kubeclient.services.ServiceType
buildUpExternalRestService, classify, getRestPortFromExternalService
-
-
-
-
Field Detail
-
INSTANCE
public static final LoadBalancerService INSTANCE
-
-
Method Detail
-
buildUpInternalService
public io.fabric8.kubernetes.api.model.Service buildUpInternalService(KubernetesJobManagerParameters kubernetesJobManagerParameters)
Description copied from class:ServiceType
Build up the internal service template, according to the jobManager parameters.- Specified by:
buildUpInternalService
in classServiceType
- Parameters:
kubernetesJobManagerParameters
- the parameters of jobManager.- Returns:
- the internal service
-
getRestEndpoint
public Optional<Endpoint> getRestEndpoint(io.fabric8.kubernetes.api.model.Service targetService, io.fabric8.kubernetes.client.NamespacedKubernetesClient internalClient, KubernetesConfigOptions.NodePortAddressType nodePortAddressType)
Description copied from class:ServiceType
Gets the rest endpoint from the kubernetes service.- Specified by:
getRestEndpoint
in classServiceType
- Parameters:
targetService
- the target service to retrieve from.internalClient
- the client to interact with api server.nodePortAddressType
- the target address type of the node.- Returns:
- the rest endpoint.
-
getRestPort
public int getRestPort(io.fabric8.kubernetes.api.model.ServicePort port)
Description copied from class:ServiceType
Gets the rest port from the service port.- Specified by:
getRestPort
in classServiceType
- Parameters:
port
- the target service port.- Returns:
- the rest port.
-
getType
public String getType()
Description copied from class:ServiceType
Gets the type of the target kubernetes service.- Specified by:
getType
in classServiceType
- Returns:
- the type of the target kubernetes service.
-
-