Package io.fabric8.kubernetes.client.dsl
Interface NonDeletingOperation<T>
-
- All Superinterfaces:
CreateOrReplaceable<T>,Deletable,DeletableWithOptions,EditReplacePatchable<T>,GracePeriodConfigurable<PropagationPolicyConfigurable<? extends Deletable>>,ItemReplacable<T>,ItemWritableOperation<T>,PropagationPolicyConfigurable<GracePeriodConfigurable<? extends Deletable>>,Replaceable<T>,ServerSideApplicable<T>,Timeoutable,Updatable<T>
- All Known Subinterfaces:
CertificateSigningRequestResource<T>,ExtensibleResource<T>,NamespaceableResource<T>,PodResource,Resource<T>,RollableScalableResource<T>,ScalableResource<T>,ServiceAccountResource,ServiceResource<T>,V1beta1CertificateSigningRequestResource<T>,WritableOperation<T>
- All Known Implementing Classes:
ExtensibleResourceAdapter,ResourceAdapter
public interface NonDeletingOperation<T> extends CreateOrReplaceable<T>, EditReplacePatchable<T>, Replaceable<T>, ItemReplacable<T>, ItemWritableOperation<T>, ServerSideApplicable<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TcreateOr(Function<NonDeletingOperation<T>,T> conflictAction)Alternative toCreateOrReplaceable.createOrReplace().TeditStatus(UnaryOperator<T> function)Edit the status subresourceTpatchStatus()Does a PATCH request to the /status subresource ignoring changes to anything except the status stanza.EditReplacePatchable<T>subresource(String subresource)Provides edit, patch, and replace methods for the given subresourceNonDeletingOperation<T>unlock()Removes the resource version from the current item.-
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.EditReplacePatchable
accept, edit, edit, edit, patch, patch, patch, patch, patch, patch
-
Methods inherited from interface io.fabric8.kubernetes.client.GracePeriodConfigurable
withGracePeriod
-
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.PropagationPolicyConfigurable
withPropagationPolicy
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Replaceable
replaceStatus, updateStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ServerSideApplicable
fieldManager, forceConflicts, serverSideApply
-
-
-
-
Method Detail
-
createOr
T createOr(Function<NonDeletingOperation<T>,T> conflictAction)
Alternative toCreateOrReplaceable.createOrReplace().Will attempt a create, and if that fails will perform the conflictAction.
Most commonly the conflictAction will be NonDeletingOperation::update or NonDeletingOperation::patch, but you are free to provide whatever Function suits your needs.
- Parameters:
conflictAction- to be performed it the create fails with a conflict- Returns:
-
unlock
NonDeletingOperation<T> unlock()
Removes 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.- Returns:
- NonDeletingOperation that may act on the unlocked item
-
editStatus
T editStatus(UnaryOperator<T> function)
Edit the status subresource- Parameters:
function- to produce a modified status- Returns:
- updated object
-
patchStatus
T patchStatus()
Does a PATCH request to the /status subresource ignoring changes to anything except the status stanza.This method has the same patching behavior as
EditReplacePatchable.patch(PatchContext), withPatchType.JSON_MERGEbut against the status subresource.Set the resourceVersion to null to prevent optimistic locking.
- Returns:
- updated object
-
subresource
EditReplacePatchable<T> subresource(String subresource)
Provides edit, patch, and replace methods for the given subresource
-
-