Interface ExtensibleResource<T>
-
- 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>,Resource<T>,Scalable<T>,ServerSideApplicable<T>,Timeoutable,TimeoutableScalable<T>,Updatable<T>,Waitable<T,T>,Watchable<T>,WatchAndWaitable<T>,WritableOperation<T>
- All Known Implementing Classes:
ExtensibleResourceAdapter
public interface ExtensibleResource<T> extends Resource<T>, TimeoutableScalable<T>
Provides an interface that is usable by theExtensibleResourceAdapterthat returns a non-specialized value
-
-
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 Modifier and Type Method Description ExtensibleResource<T>dryRun(boolean isDryRun)Indicates whether modifications should not be persisted or not.ExtensibleResource<T>fieldManager(String manager)FieldManager is a name associated with the actor or entity that is making these changes.ExtensibleResource<T>fieldValidation(FieldValidateable.Validation fieldValidation)Instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled.ExtensibleResource<T>forceConflicts()Force this request / fieldManager to take ownership over conflicting fields.ExtensibleResource<T>fromServer()TgetItem()Return the current item, which may be null if the resource was created usingNameable.withName(String)<C extends Client>
CinWriteContext(Class<C> clazz)Should be used to obtain a client in the same write context as the given resource - dryRun, DeletionPropagation, etc.ExtensibleResource<T>lockResourceVersion()ExtensibleResource<T>lockResourceVersion(String resourceVersion)default Tscale(int count)Scale the resource to given countExtensibleResource<T>subresource(String subresource)Provides edit, patch, and replace methods for the given subresourceExtensibleResource<T>unlock()Removes the resource version from the current item.ExtensibleResource<T>withGracePeriod(long gracePeriodSeconds)The duration in seconds before the object should be deleted.ExtensibleResource<T>withIndexers(Map<String,Function<T,List<String>>> indexers)The indexers to add toSharedIndexInformers created by subsequent inform calls;ExtensibleResource<T>withLimit(Long limit)Set the limit to the number of resources to list at one time.ExtensibleResource<T>withPropagationPolicy(io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy)Whether and how garbage collection will be performed.ExtensibleResource<T>withResourceVersion(String resourceVersion)ExtensibleResource<T>withTimeout(long timeout, TimeUnit unit)Perform the delete operation as blocking, waiting for finalizers, for up to the given timeoutdefault ExtensibleResource<T>withTimeoutInMillis(long timeoutInMillis)Perform the delete operation as blocking, waiting for finalizers, for up to the given timeout-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.CreateOrReplaceable
create, createOrReplace
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.DryRunable
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.Informable
inform, inform, inform, informOnCondition, runnableInformer
-
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
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Replaceable
replaceStatus, updateStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Resource
cascading, isReady, item, require
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ServerSideApplicable
serverSideApply
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Waitable
waitUntilCondition, waitUntilReady
-
-
-
-
Method Detail
-
lockResourceVersion
ExtensibleResource<T> lockResourceVersion(String resourceVersion)
- Specified by:
lockResourceVersionin interfaceResource<T>
-
dryRun
ExtensibleResource<T> dryRun(boolean isDryRun)
Description copied from interface:DryRunableIndicates whether modifications should not be persisted or not. If enabled, All dry run stages will be processed. the request is still processed as typical request: the fields are defaulted, the object is validated, it goes through the validation admission chain, and through the mutating admission chain, and then the final object is returned to the user as it normally would, without being persisted.- Specified by:
dryRunin interfaceDryRunable<T>- Parameters:
isDryRun- whether dry run is enabled or disabled- Returns:
- write operations which are applicable for dry run
-
withResourceVersion
ExtensibleResource<T> withResourceVersion(String resourceVersion)
- Specified by:
withResourceVersionin interfaceWatchAndWaitable<T>
-
fromServer
ExtensibleResource<T> fromServer()
- Specified by:
fromServerin interfaceFromServerGettable<T>
-
withGracePeriod
ExtensibleResource<T> withGracePeriod(long gracePeriodSeconds)
Description copied from interface:GracePeriodConfigurableThe duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.- Specified by:
withGracePeriodin interfaceGracePeriodConfigurable<T>- Parameters:
gracePeriodSeconds- grace period integer value in seconds- Returns:
- the object for which grace period is configured
-
withPropagationPolicy
ExtensibleResource<T> withPropagationPolicy(io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy)
Description copied from interface:PropagationPolicyConfigurableWhether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both.The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
Acceptable values are:
'Orphan' - orphan the dependents;
'Background' - allow the garbage collector to delete the dependents in the background;
'Foreground' - a cascading policy that deletes all dependents in the foreground.- Specified by:
withPropagationPolicyin interfacePropagationPolicyConfigurable<T>- Parameters:
propagationPolicy- propagation policy in form of stringDeletionPropagation- Returns:
- resource
-
withIndexers
ExtensibleResource<T> withIndexers(Map<String,Function<T,List<String>>> indexers)
Description copied from interface:InformableThe indexers to add toSharedIndexInformers created by subsequent inform calls;- Specified by:
withIndexersin interfaceInformable<T>- Parameters:
indexers- to customize the indexing- Returns:
- the current
Informable
-
inWriteContext
<C extends Client> C inWriteContext(Class<C> clazz)
Should be used to obtain a client in the same write context as the given resource - dryRun, DeletionPropagation, etc.- Parameters:
clazz- client type- Returns:
- the client in the write context
-
withLimit
ExtensibleResource<T> withLimit(Long limit)
Description copied from interface:InformableSet the limit to the number of resources to list at one time. This means that longer lists will take multiple requests to fetch.If the list fails to complete it will be re-attempted with this limit, rather than falling back to the full list. You should ensure that your handlers are either async or fast acting to prevent long delays in list processing that may cause results to expire before reaching the end of the list.
WARNING As noted in the go client: "paginated lists are always served directly from etcd, which is significantly less efficient and may lead to serious performance and scalability problems."
- Specified by:
withLimitin interfaceInformable<T>- Parameters:
limit- of a items in a list fetch- Returns:
- the current
Informable
-
lockResourceVersion
ExtensibleResource<T> lockResourceVersion()
- Specified by:
lockResourceVersionin interfaceResource<T>
-
getItem
T getItem()
Return the current item, which may be null if the resource was created usingNameable.withName(String)- Returns:
- the item
-
fieldValidation
ExtensibleResource<T> fieldValidation(FieldValidateable.Validation fieldValidation)
Description copied from interface:FieldValidateableInstructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled.- Specified by:
fieldValidationin interfaceFieldValidateable<T>- Returns:
- write operations where field validation is applicable.
-
fieldManager
ExtensibleResource<T> fieldManager(String manager)
Description copied from interface:ServerSideApplicableFieldManager is a name associated with the actor or entity that is making these changes.The value must be less than or 128 characters long, and only contain printable characters
the default value is "fabric8"
- Specified by:
fieldManagerin interfaceServerSideApplicable<T>- Returns:
ServerSideApplicablefor continued operations
-
forceConflicts
ExtensibleResource<T> forceConflicts()
Description copied from interface:ServerSideApplicableForce this request / fieldManager to take ownership over conflicting fields.- Specified by:
forceConflictsin interfaceServerSideApplicable<T>- Returns:
ServerSideApplicablefor continued operations
-
withTimeout
ExtensibleResource<T> withTimeout(long timeout, TimeUnit unit)
Description copied from interface:DeletablePerform the delete operation as blocking, waiting for finalizers, for up to the given timeout- Specified by:
withTimeoutin interfaceDeletable- Specified by:
withTimeoutin interfaceTimeoutable- Specified by:
withTimeoutin interfaceTimeoutableScalable<T>- Parameters:
timeout- 0 indicates no wait
-
unlock
ExtensibleResource<T> unlock()
Description copied from interface:NonDeletingOperationRemoves the resource version from the current item. If the operation context was created by name, and without an item, this will fetch the item from the api server first.- Specified by:
unlockin interfaceNonDeletingOperation<T>- Returns:
- NonDeletingOperation that may act on the unlocked item
-
subresource
ExtensibleResource<T> subresource(String subresource)
Description copied from interface:NonDeletingOperationProvides edit, patch, and replace methods for the given subresource- Specified by:
subresourcein interfaceNonDeletingOperation<T>
-
withTimeoutInMillis
default ExtensibleResource<T> withTimeoutInMillis(long timeoutInMillis)
Description copied from interface:DeletablePerform the delete operation as blocking, waiting for finalizers, for up to the given timeout- Specified by:
withTimeoutInMillisin interfaceDeletable- Specified by:
withTimeoutInMillisin interfaceTimeoutable- Specified by:
withTimeoutInMillisin interfaceTimeoutableScalable<T>- Parameters:
timeoutInMillis- 0 indicates no wait
-
-