Package io.fabric8.kubernetes.client
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 classResourceHandler.Key -
Method Summary
Modifier and Type Method Description Tcreate(okhttp3.OkHttpClient client, Config config, String namespace, T item)Create the specified resource.Booleandelete(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy, T item)Delete the specified resource (if exists).Vedit(T item)Edit the specified resource.StringgetApiVersion()StringgetKind()Treload(okhttp3.OkHttpClient client, Config config, String namespace, T item)Reload the specified resource (if exists).Treplace(okhttp3.OkHttpClient client, Config config, String namespace, T item)Replace the specified resource.TwaitUntilCondition(okhttp3.OkHttpClient client, Config config, String namespace, T item, Predicate<T> condition, long amount, TimeUnit timeUnit)TwaitUntilReady(okhttp3.OkHttpClient client, Config config, String namespace, T item, long amount, TimeUnit timeUnit)Waits until the specified resource is Ready.Watchwatch(okhttp3.OkHttpClient client, Config config, String namespace, T item, io.fabric8.kubernetes.api.model.ListOptions listOptions, Watcher<T> watcher)Watches the specified resource for changesWatchwatch(okhttp3.OkHttpClient client, Config config, String namespace, T item, Watcher<T> watcher)Watches the specified resource for changes.Watchwatch(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
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
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
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
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. -
watch
Watch watch(okhttp3.OkHttpClient client, Config config, String namespace, T item, String resourceVersion, Watcher<T> watcher)Watches the specified resource for changes. -
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 -
waitUntilReady
T waitUntilReady(okhttp3.OkHttpClient client, Config config, String namespace, T item, long amount, TimeUnit timeUnit) throws InterruptedExceptionWaits 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 waittimeUnit- The waitTimeUnit.- 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
-