Class KUBE_PING

java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.Discovery
org.jgroups.protocols.kubernetes.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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected String
     
    protected Client
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected int
     
    protected boolean
     
    protected static final short
     
    protected String
     
    protected String
     
    protected int
     
    protected String
     
    protected String
     
    protected int
     
    protected long
     
    protected int
     
    protected int
     
    protected String
     
    protected boolean
     
    protected int
     
    protected boolean
     

    Fields inherited from class org.jgroups.protocols.Discovery

    async_discovery, async_discovery_use_separate_thread_per_request, break_on_coord_rsp, cluster_name, current_coord, discovery_req_futures, discovery_rsp_callback, discovery_rsp_expiry_time, is_coord, is_leaving, is_server, max_members_in_discovery_request, max_rank_to_reply, num_discovery_requests, num_discovery_runs, ping_responses, return_entire_cache, send_cache_on_join, sends_can_block, stagger_timeout, timer, transport, transport_supports_multicasting, use_disk_cache, view, WHITESPACE

    Fields inherited from class org.jgroups.stack.Protocol

    after_creation_hook, down_prot, ergonomics, id, local_addr, log, policies, preview_warning, stack, stats, up_prot
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    findMembers(List<org.jgroups.Address> members, boolean initial_discovery, org.jgroups.util.Responses responses)
     
    void
     
    protected boolean
     
    boolean
     
    protected List<Pod>
     
    protected void
    sendDiscoveryRequest(org.jgroups.Message req)
     
    void
    setMasterHost(String masterMost)
     
    void
    setMasterPort(int masterPort)
     
    void
    setNamespace(String namespace)
     
     

    Methods inherited from class org.jgroups.protocols.Discovery

    addDiscoveryResponseToCaches, addResponse, addResponse, addressAsString, addToCache, asyncDiscovery, asyncDiscovery, asyncDiscoveryUseSeparateThread, asyncDiscoveryUseSeparateThread, breakOnCoordResponse, breakOnCoordResponse, callFindMembersInAllDiscoveryProtocols, clearRequestFutures, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, discoveryRspExpiryTime, disseminateDiscoveryInformation, down, dumpCache, findInitialMembersAsString, findMembers, findTopmostDiscoveryProtocol, getClusterName, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getView, getViewId, handle, handleConnect, handleDisconnect, handleDiscoveryResponse, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, marshal, marshal, maxRankToReply, maxRankToReply, numDiscoveryRuns, numDiscoveryRuns, print, providedUpServices, read, readPingData, resetStats, returnEntireCache, returnEntireCache, sendCacheInformation, sendCacheOnJoin, sendCacheOnJoin, sendDiscoveryResponse, sendDiscoveryResponse, serializeWithoutView, setClusterName, staggerTimeout, staggerTimeout, start, startCacheDissemination, stop, transportSupportsMulticasting, up, up, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponses, write

    Methods inherited from class org.jgroups.stack.Protocol

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • KUBERNETES_PING_ID

      protected static final short KUBERNETES_PING_ID
      See Also:
    • 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
    • split_clusters_during_rolling_update

      protected boolean split_clusters_during_rolling_update
    • useNotReadyAddresses

      protected boolean useNotReadyAddresses
    • dump_requests

      protected boolean dump_requests
    • client

      protected Client client
    • tp_bind_port

      protected int tp_bind_port
  • Constructor Details

    • KUBE_PING

      public KUBE_PING()
  • Method Details

    • 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)
    • toString

      public String toString()
      Overrides:
      toString in class org.jgroups.stack.Protocol