Class ServiceType

    • Constructor Detail

      • ServiceType

        public ServiceType()
    • Method Detail

      • buildUpExternalRestService

        public io.fabric8.kubernetes.api.model.Service buildUpExternalRestService​(KubernetesJobManagerParameters kubernetesJobManagerParameters)
        Build up the external rest service template, according to the jobManager parameters.
        Parameters:
        kubernetesJobManagerParameters - the parameters of jobManager.
        Returns:
        the external rest service
      • buildUpInternalService

        public abstract io.fabric8.kubernetes.api.model.Service buildUpInternalService​(KubernetesJobManagerParameters kubernetesJobManagerParameters)
        Build up the internal service template, according to the jobManager parameters.
        Parameters:
        kubernetesJobManagerParameters - the parameters of jobManager.
        Returns:
        the internal service
      • getRestEndpoint

        public 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.
        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 abstract int getRestPort​(io.fabric8.kubernetes.api.model.ServicePort port)
        Gets the rest port from the service port.
        Parameters:
        port - the target service port.
        Returns:
        the rest port.
      • getType

        public abstract String getType()
        Gets the type of the target kubernetes service.
        Returns:
        the type of the target kubernetes service.
      • getRestPortFromExternalService

        public int getRestPortFromExternalService​(io.fabric8.kubernetes.api.model.Service externalService)
        Get rest port from the external Service.