public abstract class ServiceType extends Object
Constructor and Description |
---|
ServiceType() |
Modifier and Type | Method and Description |
---|---|
io.fabric8.kubernetes.api.model.Service |
buildUpExternalRestService(KubernetesJobManagerParameters kubernetesJobManagerParameters)
Build up the external rest service template, according to the jobManager parameters.
|
abstract io.fabric8.kubernetes.api.model.Service |
buildUpInternalService(KubernetesJobManagerParameters kubernetesJobManagerParameters)
Build up the internal service template, according to the jobManager parameters.
|
static KubernetesConfigOptions.ServiceExposedType |
classify(io.fabric8.kubernetes.api.model.Service service) |
abstract 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.
|
abstract int |
getRestPort(io.fabric8.kubernetes.api.model.ServicePort port)
Gets the rest port from the service port.
|
int |
getRestPortFromExternalService(io.fabric8.kubernetes.api.model.Service externalService)
Get rest port from the external Service.
|
abstract String |
getType()
Gets the type of the target kubernetes service.
|
public io.fabric8.kubernetes.api.model.Service buildUpExternalRestService(KubernetesJobManagerParameters kubernetesJobManagerParameters)
kubernetesJobManagerParameters
- the parameters of jobManager.public abstract io.fabric8.kubernetes.api.model.Service buildUpInternalService(KubernetesJobManagerParameters kubernetesJobManagerParameters)
kubernetesJobManagerParameters
- the parameters of jobManager.public abstract Optional<Endpoint> getRestEndpoint(io.fabric8.kubernetes.api.model.Service targetService, io.fabric8.kubernetes.client.NamespacedKubernetesClient internalClient, KubernetesConfigOptions.NodePortAddressType nodePortAddressType)
targetService
- the target service to retrieve from.internalClient
- the client to interact with api server.nodePortAddressType
- the target address type of the node.public abstract int getRestPort(io.fabric8.kubernetes.api.model.ServicePort port)
port
- the target service port.public abstract String getType()
public int getRestPortFromExternalService(io.fabric8.kubernetes.api.model.Service externalService)
public static KubernetesConfigOptions.ServiceExposedType classify(io.fabric8.kubernetes.api.model.Service service)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.