Class KUBE_PING

  • All Implemented Interfaces:
    org.jgroups.Lifecycle

    public class KUBE_PING
    extends org.jgroups.protocols.Discovery
    Kubernetes based discovery protocol. Uses the Kubernetes master to fetch the IP addresses of all pods that have been created, then pings each pods separately. The ports are defined by bind_port in TP plus port_range.
    Author:
    Ales Justin, Sebastian Ɓaskawiec, Bela Ban, Radoslav Husar
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.jgroups.protocols.Discovery

        org.jgroups.protocols.Discovery.DiscoveryCacheDisseminationTask
    • Constructor Summary

      Constructors 
      Constructor Description
      KUBE_PING()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String fetchFromKube()  
      void findMembers​(List<org.jgroups.Address> members, boolean initial_discovery, org.jgroups.util.Responses responses)  
      void init()  
      protected boolean isClusteringEnabled()  
      boolean isDynamic()  
      protected List<Pod> readAll()  
      protected void sendDiscoveryRequest​(org.jgroups.Message req)  
      void setMasterHost​(String masterMost)  
      void setMasterPort​(int masterPort)  
      void setNamespace​(String namespace)  
      String toString()  
      • Methods inherited from class org.jgroups.protocols.Discovery

        addDiscoveryResponseToCaches, addResponse, addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, callFindMembersInAllDiscoveryProtocols, clearRequestFutures, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, disseminateDiscoveryInformation, down, dumpCache, findInitialMembersAsString, findMembers, findTopmostDiscoveryProtocol, getClusterName, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getView, getViewId, handle, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, providedUpServices, read, readPingData, resetStats, returnEntireCache, returnEntireCache, sendCacheInformation, sendDiscoveryResponse, serializeWithoutView, setClusterName, staggerTimeout, staggerTimeout, start, startCacheDissemination, stop, up, up, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponses, write
      • Methods inherited from class org.jgroups.stack.Protocol

        accept, addr, addr, afterCreationHook, destroy, down, enableStats, getAddress, getComponents, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setAddress, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled
    • Field Detail

      • port_range

        protected int port_range
      • connectTimeout

        protected int connectTimeout
      • readTimeout

        protected int readTimeout
      • operationAttempts

        protected int operationAttempts
      • operationSleep

        protected long operationSleep
      • masterProtocol

        protected String masterProtocol
      • masterHost

        protected String masterHost
      • masterPort

        protected int masterPort
      • apiVersion

        protected String apiVersion
      • namespace

        protected String namespace
      • labels

        protected String labels
      • clientCertFile

        protected String clientCertFile
      • clientKeyFile

        protected String clientKeyFile
      • clientKeyPassword

        protected String clientKeyPassword
      • clientKeyAlgo

        protected String clientKeyAlgo
      • caCertFile

        protected String caCertFile
      • saTokenFile

        protected String saTokenFile
      • dump_requests

        protected boolean dump_requests
      • split_clusters_during_rolling_update

        protected boolean split_clusters_during_rolling_update
      • useNotReadyAddresses

        protected boolean useNotReadyAddresses
      • client

        protected Client client
      • tp_bind_port

        protected int tp_bind_port
    • Constructor Detail

      • KUBE_PING

        public KUBE_PING()
    • Method Detail

      • isDynamic

        public boolean isDynamic()
        Specified by:
        isDynamic in class org.jgroups.protocols.Discovery
      • setMasterHost

        public void setMasterHost​(String masterMost)
      • setMasterPort

        public void setMasterPort​(int masterPort)
      • setNamespace

        public void setNamespace​(String namespace)
      • isClusteringEnabled

        protected boolean isClusteringEnabled()
      • init

        public void init()
                  throws Exception
        Specified by:
        init in interface org.jgroups.Lifecycle
        Overrides:
        init in class org.jgroups.protocols.Discovery
        Throws:
        Exception
      • findMembers

        public void findMembers​(List<org.jgroups.Address> members,
                                boolean initial_discovery,
                                org.jgroups.util.Responses responses)
        Specified by:
        findMembers in class org.jgroups.protocols.Discovery
      • fetchFromKube

        public String fetchFromKube()
      • readAll

        protected List<Pod> readAll()
      • sendDiscoveryRequest

        protected void sendDiscoveryRequest​(org.jgroups.Message req)