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 LoadBalancerServiceINSTANCE
-
Constructor Summary
Constructors Constructor Description LoadBalancerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.fabric8.kubernetes.api.model.ServicebuildUpInternalService(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.intgetRestPort(io.fabric8.kubernetes.api.model.ServicePort port)Gets the rest port from the service port.StringgetType()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:ServiceTypeBuild up the internal service template, according to the jobManager parameters.- Specified by:
buildUpInternalServicein 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:ServiceTypeGets the rest endpoint from the kubernetes service.- Specified by:
getRestEndpointin 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:ServiceTypeGets the rest port from the service port.- Specified by:
getRestPortin classServiceType- Parameters:
port- the target service port.- Returns:
- the rest port.
-
getType
public String getType()
Description copied from class:ServiceTypeGets the type of the target kubernetes service.- Specified by:
getTypein classServiceType- Returns:
- the type of the target kubernetes service.
-
-