Package io.fabric8.kubernetes.client
Interface ResourceHandler<T,V extends io.fabric8.kubernetes.api.builder.VisitableBuilder<T,V>>
-
- All Known Implementing Classes:
APIServiceHandler
,CertificateSigningRequestHandler
,CertificateSigningRequestHandler
,ClusterRoleBindingHandler
,ClusterRoleHandler
,ComponentStatusHandler
,ConfigMapHandler
,ControllerRevisionHandler
,CronJobHandler
,CSIDriverHandler
,CSINodeHandler
,CustomResourceDefinitionHandler
,CustomResourceDefinitionHandler
,DaemonSetHandler
,DaemonSetHandler
,DeploymentHandler
,DeploymentHandler
,EndpointsHandler
,EndpointSliceHandler
,EventHandler
,EventHandler
,EventHandler
,HorizontalPodAutoscalerHandler
,HorizontalPodAutoscalerHandler
,HorizontalPodAutoscalerHandler
,IngressClassHandler
,IngressClassHandler
,IngressHandler
,IngressHandler
,IngressHandler
,JobHandler
,KubernetesListHandler
,LeaseHandler
,LimitRangeHandler
,MutatingWebhookConfigurationHandler
,MutatingWebhookConfigurationHandler
,NamespaceHandler
,NetworkPolicyHandler
,NetworkPolicyHandler
,NodeHandler
,NodeMetricsHandler
,PersistentVolumeClaimHandler
,PersistentVolumeHandler
,PodDisruptionBudgetHandler
,PodHandler
,PodMetricsHandler
,PodSecurityPolicyHandler
,PodTemplateHandler
,PriorityClassHandler
,PriorityClassHandler
,ReplicaSetHandler
,ReplicaSetHandler
,ReplicationControllerHandler
,ResourceQuotaHandler
,RoleBindingHandler
,RoleHandler
,RuntimeClassHandler
,RuntimeClassHandler
,RuntimeClassHandler
,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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
create(okhttp3.OkHttpClient client, Config config, String namespace, T item, boolean dryRun)
Create the specified resourceBoolean
delete(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy, long gracePeriodSeconds, T item, boolean dryRun)
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, boolean dryRun)
Replace the specified resourceT
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 changesWatch
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 Detail
-
getKind
String getKind()
-
getApiVersion
String getApiVersion()
-
create
T create(okhttp3.OkHttpClient client, Config config, String namespace, T item, boolean dryRun)
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.dryRun
- Enable dry run- Returns:
- The created resource.
-
replace
T replace(okhttp3.OkHttpClient client, Config config, String namespace, T item, boolean dryRun)
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.dryRun
- Enable dry run- Returns:
- The replaced 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, long gracePeriodSeconds, T item, boolean dryRun)
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.gracePeriodSeconds
- The duration in seconds before the object should be deleted.item
- The resource to delete.dryRun
- enable dry run- 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 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 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
-
-