Interface ResourceHandler<T,​V extends io.fabric8.kubernetes.api.builder.VisitableBuilder<T,​V>>

All Known Implementing Classes:
APIServiceHandler, CertificateSigningRequestHandler, ClusterRoleBindingHandler, ClusterRoleHandler, ComponentStatusHandler, ConfigMapHandler, ControllerRevisionHandler, CronJobHandler, CSIDriverHandler, CSINodeHandler, CustomResourceDefinitionHandler, DaemonSetHandler, DaemonSetHandler, DeploymentHandler, DeploymentHandler, EndpointsHandler, EndpointSliceHandler, EventHandler, EventHandler, HorizontalPodAutoscalerHandler, HorizontalPodAutoscalerHandler, HorizontalPodAutoscalerHandler, IngressHandler, IngressHandler, JobHandler, KubernetesListHandler, LeaseHandler, LimitRangeHandler, MutatingWebhookConfigurationHandler, MutatingWebhookConfigurationHandler, NamespaceHandler, NetworkPolicyHandler, NetworkPolicyHandler, NodeHandler, NodeMetricsHandler, PersistentVolumeClaimHandler, PersistentVolumeHandler, PodDisruptionBudgetHandler, PodHandler, PodMetricsHandler, PodPresetHandler, PodSecurityPolicyHandler, PodTemplateHandler, PriorityClassHandler, ReplicaSetHandler, ReplicaSetHandler, ReplicationControllerHandler, ResourceQuotaHandler, RoleBindingHandler, RoleHandler, SecretHandler, ServiceAccountHandler, ServiceHandler, StatefulSetHandler, StorageClassHandler, ValidatingWebhookConfigurationHandler, ValidatingWebhookConfigurationHandler, VolumeAttachmentHandler

public interface ResourceHandler<T,​V extends io.fabric8.kubernetes.api.builder.VisitableBuilder<T,​V>>
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  ResourceHandler.Key  
  • Method Summary

    Modifier and Type Method Description
    T create​(okhttp3.OkHttpClient client, Config config, String namespace, T item)
    Create the specified resource.
    Boolean delete​(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy, T item)
    Delete the specified resource (if exists).
    V edit​(T item)
    Edit the specified resource.
    String getApiVersion()  
    String getKind()  
    T reload​(okhttp3.OkHttpClient client, Config config, String namespace, T item)
    Reload the specified resource (if exists).
    T replace​(okhttp3.OkHttpClient client, Config config, String namespace, T item)
    Replace the specified resource.
    T waitUntilCondition​(okhttp3.OkHttpClient client, Config config, String namespace, T item, Predicate<T> condition, long amount, TimeUnit timeUnit)  
    T waitUntilReady​(okhttp3.OkHttpClient client, Config config, String namespace, T item, long amount, TimeUnit timeUnit)
    Waits until the specified resource is Ready.
    Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, io.fabric8.kubernetes.api.model.ListOptions listOptions, Watcher<T> watcher)
    Watches the specified resource for changes
    Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, Watcher<T> watcher)
    Watches the specified resource for changes.
    Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, String resourceVersion, Watcher<T> watcher)
    Watches the specified resource for changes.
  • Method Details

    • getKind

      String getKind()
    • getApiVersion

      String getApiVersion()
    • create

      T create​(okhttp3.OkHttpClient client, Config config, String namespace, T item)
      Create the specified resource.
      Parameters:
      client - An instance of the http client.
      config - The client config.
      namespace - The target namespace.
      item - The resource to create.
      Returns:
      The created resource.
    • replace

      T replace​(okhttp3.OkHttpClient client, Config config, String namespace, T item)
      Replace the specified resource.
      Parameters:
      client - An instance of the http client.
      config - The client config.
      namespace - The target namespace.
      item - The resource to replace.
      Returns:
      The created resource.
    • reload

      T reload​(okhttp3.OkHttpClient client, Config config, String namespace, T item)
      Reload the specified resource (if exists).
      Parameters:
      client - An instance of the http client.
      config - The client config.
      namespace - The target namespace.
      item - The resource to reload.
      Returns:
      The reloaded resource.
    • edit

      V edit​(T item)
      Edit the specified resource.
      Parameters:
      item - The resource to edit.
      Returns:
      The resource editor.
    • delete

      Boolean delete​(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy, T item)
      Delete the specified resource (if exists).
      Parameters:
      client - An instance of the http client.
      config - The client config.
      namespace - The target namespace.
      propagationPolicy - Whether and how garbage collection will be performed.
      item - The resource to delete.
      Returns:
      The true if the resource was successfully deleted.
    • watch

      Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, Watcher<T> watcher)
      Watches the specified resource for changes.
      Parameters:
      client - An instance of the http client.
      config - The client config.
      namespace - The target namespace.
      item - The resource to delete.
      watcher - The Watcher to use.
      Returns:
      The Watch
    • watch

      Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, String resourceVersion, Watcher<T> watcher)
      Watches the specified resource for changes.
      Parameters:
      client - An instance of the http client.
      config - The client config.
      namespace - The target namespace.
      item - The resource to delete.
      resourceVersion - The resourceVersion of object
      watcher - The Watcher to use.
      Returns:
      The Watch
    • watch

      Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, io.fabric8.kubernetes.api.model.ListOptions listOptions, Watcher<T> watcher)
      Watches the specified resource for changes
      Parameters:
      client - An instance of http client.
      config - The client config.
      namespace - The target namespace.
      item - The resource to delete.
      listOptions - The ListOptions for available options
      watcher - The Watcher to use.
      Returns:
      The Watch
    • waitUntilReady

      T waitUntilReady​(okhttp3.OkHttpClient client, Config config, String namespace, T item, long amount, TimeUnit timeUnit) throws InterruptedException
      Waits until the specified resource is Ready. For resources that 'readiness' is not applicable the method is equivalent to get.
      Parameters:
      client - An instance of the http client.
      config - The client config.
      namespace - The target namespace.
      item - The resource to wait.
      amount - The amount of time to wait
      timeUnit - The wait TimeUnit.
      Returns:
      The true if the resource was successfully deleted.
      Throws:
      InterruptedException - Interrupted Exception
    • waitUntilCondition

      T waitUntilCondition​(okhttp3.OkHttpClient client, Config config, String namespace, T item, Predicate<T> condition, long amount, TimeUnit timeUnit) throws InterruptedException
      Throws:
      InterruptedException