Class DefaultController

java.lang.Object
io.kubernetes.client.extended.controller.DefaultController
All Implemented Interfaces:
Controller, Runnable

public class DefaultController extends Object implements Controller
The default implementation of a controller. A typical controller contains:

- a reconciler implemented by developers specifying what to do in reaction of notifications. see more documentation on the Reconciler interface - a work-queue continuously filled with task items managed by Informer framework - a set of worker threads acutally running reconciler.

  • Constructor Details

    • DefaultController

      public DefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, Supplier<Boolean>... readyFuncs)
      Instantiates a new Default controller.
      Parameters:
      name - the name
      reconciler - the reconciler
      workQueue - the work queue
      readyFuncs - the ready funcs
    • DefaultController

      public DefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, io.prometheus.client.CollectorRegistry collectorRegistry, Supplier<Boolean>... readyFuncs)
      Instantiates a new Default controller.
      Parameters:
      name - the name
      reconciler - the reconciler
      workQueue - the work queue
      collectorRegistry - the collector registry
      readyFuncs - the ready funcs
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • shutdown

      public void shutdown()
      Description copied from interface: Controller
      Shutdown the controller.
      Specified by:
      shutdown in interface Controller
    • getWorkQueue

      public RateLimitingQueue<Request> getWorkQueue()
    • getName

      public String getName()
    • getWorkerCount

      public int getWorkerCount()
    • setWorkerCount

      public void setWorkerCount(int workerCount)
    • getWorkerThreadPool

      public ExecutorService getWorkerThreadPool()
    • setWorkerThreadPool

      public void setWorkerThreadPool(ScheduledExecutorService workerThreadPool)
    • getReconciler

      public Reconciler getReconciler()
    • getReadyTimeout

      public Duration getReadyTimeout()
    • setReadyTimeout

      public void setReadyTimeout(Duration readyTimeout)
    • getReadyCheckInternal

      public Duration getReadyCheckInternal()
    • setReadyCheckInternal

      public void setReadyCheckInternal(Duration readyCheckInternal)