Package io.fabric8.kubernetes.client.dsl
Interface Resource<T>
-
- Type Parameters:
T
- The resource type.
- All Superinterfaces:
CreateOrReplaceable<T>
,Deletable
,DeletableWithOptions
,DryRunable<WritableOperation<T>>
,EditReplacePatchable<T>
,FieldValidateable<NonDeletingOperation<T>>
,FromServerGettable<T>
,Gettable<T>
,GracePeriodConfigurable<PropagationPolicyConfigurable<? extends Deletable>>
,Informable<T>
,ItemReplacable<T>
,ItemWritableOperation<T>
,NonDeletingOperation<T>
,PropagationPolicyConfigurable<GracePeriodConfigurable<? extends Deletable>>
,Replaceable<T>
,ReplaceDeletable<T>
,Scalable<T>
,ServerSideApplicable<T>
,Timeoutable
,Updatable<T>
,Waitable<T,T>
,Watchable<T>
,WatchAndWaitable<T>
,WritableOperation<T>
- All Known Subinterfaces:
CertificateSigningRequestResource<T>
,ExtensibleResource<T>
,NamespaceableResource<T>
,PodResource
,RollableScalableResource<T>
,ScalableResource<T>
,ServiceAccountResource
,ServiceResource<T>
,V1beta1CertificateSigningRequestResource<T>
- All Known Implementing Classes:
ExtensibleResourceAdapter
,ResourceAdapter
public interface Resource<T> extends Scalable<T>, FromServerGettable<T>, WatchAndWaitable<T>, WritableOperation<T>, DryRunable<WritableOperation<T>>, Informable<T>
Interface that describes the operation that can be done on a Kubernetes resource (e.g. Pod, Service etc). This is intended to act as the common denominator of resource operations. To accommodate resources with more specialized operations, this interface should be used as a base.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.fabric8.kubernetes.client.dsl.FieldValidateable
FieldValidateable.Validation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default GracePeriodConfigurable<? extends Deletable>
cascading(boolean enabled)
Deprecated.Please UsePropagationPolicyConfigurable.withPropagationPolicy(DeletionPropagation)
instead.boolean
isReady()
Check if the resource is ready.T
item()
Get the item used to create the current operation context if available.ReplaceDeletable<T>
lockResourceVersion()
ReplaceDeletable<T>
lockResourceVersion(String resourceVersion)
T
require()
Perform aGettable.get()
, but throws an exception if the server resource does not exist.-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.CreateOrReplaceable
create, createOrReplace
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Deletable
delete, withTimeout, withTimeoutInMillis
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.DryRunable
dryRun, dryRun
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.EditReplacePatchable
accept, edit, edit, edit, patch, patch, patch, patch, patch, patch
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.FieldValidateable
fieldValidation
-
Methods inherited from interface io.fabric8.kubernetes.client.FromServerGettable
fromServer
-
Methods inherited from interface io.fabric8.kubernetes.client.GracePeriodConfigurable
withGracePeriod
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Informable
inform, inform, inform, informOnCondition, runnableInformer, withIndexers, withLimit
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ItemReplacable
replace, replaceStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ItemWritableOperation
create, createOrReplace, delete, patchStatus, updateStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.NonDeletingOperation
createOr, editStatus, patchStatus, subresource, unlock
-
Methods inherited from interface io.fabric8.kubernetes.client.PropagationPolicyConfigurable
withPropagationPolicy
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Replaceable
replaceStatus, updateStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Scalable
scale, scale, scale, scale
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ServerSideApplicable
fieldManager, forceConflicts, serverSideApply
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Waitable
waitUntilCondition, waitUntilReady
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.WatchAndWaitable
withResourceVersion
-
-
-
-
Method Detail
-
cascading
@Deprecated default GracePeriodConfigurable<? extends Deletable> cascading(boolean enabled)
Deprecated.Please UsePropagationPolicyConfigurable.withPropagationPolicy(DeletionPropagation)
instead. This field has been deprecated since 1.7.deletes dependent resources. Sets `orphanDependents` field to `false` when set `true`- Parameters:
enabled
- whether dependents should be orphaned or not.- Returns:
- resource
-
isReady
boolean isReady()
Check if the resource is ready. If no readiness check exists, this is just an existence check.Note: for resources other than Node, Deployment, ReplicaSet, StatefulSet, Pod, ReplicationController, and DeploymentConfig readiness is simply an existence check.
Also note this obtains the latest version of the resource from the server even if the context item is present.
- Returns:
- true if the resource exists and is ready.
-
require
T require() throws ResourceNotFoundException
Perform aGettable.get()
, but throws an exception if the server resource does not exist.- Returns:
- the item or throws an exception if the item doesn't exist.
- Throws:
KubernetesClientException
- if an error occursResourceNotFoundException
- if resource is absent
-
lockResourceVersion
ReplaceDeletable<T> lockResourceVersion()
-
lockResourceVersion
ReplaceDeletable<T> lockResourceVersion(String resourceVersion)
-
item
T item()
Get the item used to create the current operation context if available.- Returns:
- the current item if provided via the load, resource, or resourceList method, or null if this resource was created just from a class.
-
-