Interface ControllerFactory


public interface ControllerFactory
Controller factory interface.
  • Method Details

    • createController

      @NonNull <ApiType extends KubernetesObject> @NonNull Controller createController(@NonNull @NonNull Class<ApiType> apiTypeClass, @Nullable @Nullable Set<String> namespaces, @NonNull @NonNull ResourceReconciler<ApiType> resourceReconciler)
      Creates a controller that will process events published by SharedIndexInformers created for given namespaces. The informers should be created before this method is called.
      Type Parameters:
      ApiType - the kubernetes api type
      Parameters:
      apiTypeClass - the api type class
      namespaces - the set of namespaces should be empty or set to null for cluster-wide objects (e.g. V1Node) or for namespaced objects (e.g. V1Secret) when the controller needs to handle kubernetes objects from all namespaces
      resourceReconciler - the resource reconciler implementation
      Returns:
      the created controller
    • createController

      @NonNull <ApiType extends KubernetesObject> @NonNull Controller createController(@Nullable @Nullable String name, @NonNull @NonNull Class<ApiType> apiTypeClass, @Nullable @Nullable Set<String> namespaces, @NonNull @NonNull ResourceReconciler<ApiType> resourceReconciler)
      Creates a controller that will process events published by SharedIndexInformers created for given namespaces. The informers should be created before this method is called.
      Type Parameters:
      ApiType - the kubernetes api type
      Parameters:
      name - the name which is used to uniquely identify the created controller. If not provided, it will be generated.
      apiTypeClass - the api type class
      namespaces - the set of namespaces should be empty or set to null for cluster-wide objects (e.g. V1Node) or for namespaced objects (e.g. V1Secret) when the controller needs to handle kubernetes objects from all namespaces
      resourceReconciler - the resource reconciler implementation
      Returns:
      the created controller
    • createController

      @NonNull <ApiType extends KubernetesObject> @NonNull Controller createController(@Nullable @Nullable String name, @NonNull @NonNull Class<ApiType> apiTypeClass, @Nullable @Nullable Set<String> namespaces, @NonNull @NonNull ResourceReconciler<ApiType> resourceReconciler, @Nullable @Nullable RateLimitingQueue<Request> workQueue)
      Creates a controller that will process events published by SharedIndexInformers created for given namespaces. The informers should be created before this method is called.
      Type Parameters:
      ApiType - the kubernetes api type
      Parameters:
      name - the name which is used to uniquely identify the created controller. If not provided, it will be generated.
      apiTypeClass - the api type class
      namespaces - the set of namespaces should be empty or set to null for cluster-wide objects (e.g. V1Node) or for namespaced objects (e.g. V1Secret) when the controller needs to handle kubernetes objects from all namespaces
      resourceReconciler - the resource reconciler implementation
      workQueue - the producer-consumer queue where a producer is an informer and a consumer is a created controller. If not provided, DefaultRateLimitingQueue will be used.
      Returns:
      the created controller
    • createController

      @NonNull <ApiType extends KubernetesObject> @NonNull Controller createController(@Nullable @Nullable String name, @NonNull @NonNull Class<ApiType> apiTypeClass, @Nullable @Nullable Set<String> namespaces, @NonNull @NonNull ResourceReconciler<ApiType> resourceReconciler, @Nullable @Nullable RateLimitingQueue<Request> workQueue, @Nullable @Nullable Predicate<ApiType> onAddFilterPredicate, @Nullable @Nullable BiPredicate<ApiType,ApiType> onUpdateFilterPredicate, @Nullable @Nullable BiPredicate<ApiType,Boolean> onDeleteFilterPredicate)
      Creates a controller that will process events published by SharedIndexInformers created for given namespaces. The informers should be created before this method is called.
      Type Parameters:
      ApiType - the kubernetes api type
      Parameters:
      name - the name which is used to uniquely identify the created controller. If not provided, it will be generated.
      apiTypeClass - the api type class
      namespaces - the set of namespaces should be empty or set to null for cluster-wide objects (e.g. V1Node) or for namespaced objects (e.g. V1Secret) when the controller needs to handle kubernetes objects from all namespaces
      resourceReconciler - the resource reconciler implementation
      workQueue - the producer-consumer queue where a producer is an informer and a consumer is a created controller. If not provided, DefaultRateLimitingQueue will be used.
      onAddFilterPredicate - The filter which is applied by informer's resource handler when a new resource is created.
      onUpdateFilterPredicate - The filter which is applied by informer's resource handler when an existing resource is updated.
      onDeleteFilterPredicate - The filter which is applied by informer's resource handler when an existing resource is deleted.
      Returns:
      the created controller
    • startControllers

      void startControllers()
      Starts created controllers.
    • stopControllers

      void stopControllers()
      Stops created controllers.