Class HasMetadataOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
- java.lang.Object
-
- io.fabric8.kubernetes.client.dsl.internal.OperationSupport
-
- io.fabric8.kubernetes.client.dsl.internal.CreateOnlyResourceOperation<T,T>
-
- io.fabric8.kubernetes.client.dsl.internal.BaseOperation<T,L,R>
-
- io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation<T,L,R>
-
- All Implemented Interfaces:
AnyNamespaceable<AnyNamespaceOperation<T,L,R>>
,AnyNamespaceOperation<T,L,R>
,CreateOrReplaceable<T>
,Deletable
,DeletableWithOptions
,DryRunable<WritableOperation<T>>
,EditReplacePatchable<T>
,FieldValidateable<NonDeletingOperation<T>>
,Filterable<FilterWatchListDeletable<T,L,R>>
,FilterWatchListDeletable<T,L,R>
,Gettable<T>
,Informable<T>
,InOutCreateable<T,T>
,ItemReplacable<T>
,ItemWritableOperation<T>
,Listable<L>
,MixedOperation<T,L,R>
,Nameable<R>
,Namespaceable<NonNamespaceOperation<T,L,R>>
,NonDeletingOperation<T>
,NonNamespaceOperation<T,L,R>
,Replaceable<T>
,ReplaceDeletable<T>
,Resource<T>
,Scalable<T>
,ServerSideApplicable<T>
,Timeoutable
,TimeoutableScalable<T>
,Updatable<T>
,Waitable<T,T>
,Watchable<T>
,WatchAndWaitable<T>
,WritableOperation<T>
,ExtensibleResource<T>
,FromServerGettable<T>
,GracePeriodConfigurable<PropagationPolicyConfigurable<? extends Deletable>>
,ListerWatcher<T,L>
,OperationInfo
,PropagationPolicyConfigurable<GracePeriodConfigurable<? extends Deletable>>
- Direct Known Subclasses:
CertificateSigningRequestOperationsImpl
,CertificateSigningRequestOperationsImpl
,GenericKubernetesResourceOperationsImpl
,HasMetadataOperationsImpl
,JobOperationsImpl
,PodOperationsImpl
,RollableScalableResourceOperation
,ServiceAccountOperationsImpl
,ServiceOperationsImpl
public class HasMetadataOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>> extends BaseOperation<T,L,R>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.fabric8.kubernetes.client.dsl.FieldValidateable
FieldValidateable.Validation
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_GRACE_PERIOD_IN_SECONDS
static io.fabric8.kubernetes.api.model.DeletionPropagation
DEFAULT_PROPAGATION_POLICY
-
Fields inherited from class io.fabric8.kubernetes.client.dsl.internal.BaseOperation
apiVersion, listType
-
Fields inherited from class io.fabric8.kubernetes.client.dsl.internal.CreateOnlyResourceOperation
type
-
Fields inherited from class io.fabric8.kubernetes.client.dsl.internal.OperationSupport
apiGroupName, apiGroupVersion, config, context, dryRun, httpClient, JSON, JSON_MERGE_PATCH, JSON_PATCH, name, namespace, resourceT, STRATEGIC_MERGE_JSON_PATCH, subresource
-
-
Constructor Summary
Constructors Constructor Description HasMetadataOperation(OperationContext ctx, Class<T> type, Class<L> listType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
accept(Consumer<T> consumer)
T
edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
T
edit(UnaryOperator<T> function)
T
editStatus(UnaryOperator<T> function)
protected T
handleReplace(T item)
base replace operation, which is effectively a forced update with retriesprotected T
modifyItemForReplaceOrPatch(Supplier<T> current, T item)
Modify the item prior to a replace or a JSON patch diffHasMetadataOperation<T,L,R>
newInstance(OperationContext context)
T
patch()
T
patch(PatchContext patchContext)
T
patch(PatchContext patchContext, String patch)
T
patch(PatchContext patchContext, T item)
protected T
patch(PatchContext context, T base, T item)
Perform a patch.T
patchStatus()
T
patchStatus(T item)
T
replace()
T
replaceStatus()
T
scale(int count)
T
scale(int count, boolean wait)
io.fabric8.kubernetes.api.model.autoscaling.v1.Scale
scale(io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scaleParam)
T
update()
protected T
update(T item)
T
updateStatus()
protected void
waitUntilScaled(int count)
Let's wait until there are enough Ready pods.-
Methods inherited from class io.fabric8.kubernetes.client.dsl.internal.BaseOperation
appendListOptionParams, create, createOr, createOrReplace, createOrReplace, delete, delete, delete, deleteAll, dryRun, dryRun, edit, fetchListUrl, fieldManager, fieldValidation, forceConflicts, forOperationType, fromServer, get, getApiEndpointPath, getConfigType, getFieldQueryParam, getGracePeriodSeconds, getGroup, getItem, getItemOrRequireFromServer, getKind, getLimit, getListType, getNonNullItem, getOperationType, getPlural, getPropagationPolicy, getReadiness, getResourceVersion, getVersion, getWatchReconnectInterval, handleCreate, handleDeploymentRollback, handleGet, handlePatch, handleResponse, handleScale, handleUpdate, inAnyNamespace, inform, informOnCondition, inNamespace, inWriteContext, isReady, isResourceNamespaced, item, list, list, list, load, load, load, load, lockResourceVersion, lockResourceVersion, newResource, replace, replaceStatus, require, requireFromServer, resource, resources, runnableInformer, serverSideApply, setListType, setType, submitList, submitWatch, subresource, unlock, updateApiVersion, updateListItems, updateStatus, waitUntilCondition, waitUntilReady, watch, watch, watch, withField, withFields, withGracePeriod, withIndexers, withInvolvedObject, withLabel, withLabelIn, withLabelNotIn, withLabels, withLabelSelector, withLabelSelector, withLimit, withName, withNewFilter, withoutField, withoutFields, withoutLabel, withoutLabels, withPropagationPolicy, withResourceVersion, withTimeout
-
Methods inherited from class io.fabric8.kubernetes.client.dsl.internal.CreateOnlyResourceOperation
create, getType
-
Methods inherited from class io.fabric8.kubernetes.client.dsl.internal.OperationSupport
addNamespacedUrlPathParts, assertResponseCode, checkName, checkNamespace, correctNamespace, createStatus, createStatus, getAPIGroupName, getAPIGroupVersion, getConfig, getKubernetesSerialization, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getOperationContext, getRequestConfig, getResourceT, getResourceUrl, getResourceUrl, getResourceUrl, getResourceURLForPatchOperation, getResourceURLForWriteOperation, getRootUrlParts, handleCreate, handleDelete, handleDeploymentRollback, handleGet, handleMetric, handlePatch, handlePatch, handleRaw, handleRawGet, handleResponse, handleResponse, handleScale, handleUpdate, requestException, requestException, requestFailure, requestFailure, restCall, waitForResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.AnyNamespaceOperation
delete
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.EditReplacePatchable
patch, patch
-
Methods inherited from interface io.fabric8.kubernetes.client.extension.ExtensibleResource
withTimeoutInMillis
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Filterable
withLabel, withoutLabel
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Informable
inform, inform
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ItemWritableOperation
create
-
Methods inherited from interface io.fabric8.kubernetes.client.OperationInfo
getFullResourceName, getName, getNamespace
-
-
-
-
Field Detail
-
DEFAULT_PROPAGATION_POLICY
public static final io.fabric8.kubernetes.api.model.DeletionPropagation DEFAULT_PROPAGATION_POLICY
-
DEFAULT_GRACE_PERIOD_IN_SECONDS
public static final long DEFAULT_GRACE_PERIOD_IN_SECONDS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HasMetadataOperation
public HasMetadataOperation(OperationContext ctx, Class<T> type, Class<L> listType)
-
-
Method Detail
-
edit
public T edit(UnaryOperator<T> function)
-
editStatus
public T editStatus(UnaryOperator<T> function)
- Specified by:
editStatus
in interfaceNonDeletingOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Overrides:
editStatus
in classBaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
-
edit
public T edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
-
replace
public T replace()
-
replaceStatus
public T replaceStatus()
- Specified by:
replaceStatus
in interfaceReplaceable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Overrides:
replaceStatus
in classBaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
-
modifyItemForReplaceOrPatch
protected T modifyItemForReplaceOrPatch(Supplier<T> current, T item)
Modify the item prior to a replace or a JSON patch diff- Parameters:
current
- item from the serveritem
- to be modified- Returns:
- the modified item
-
update
public T update()
-
updateStatus
public T updateStatus()
- Specified by:
updateStatus
in interfaceReplaceable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Overrides:
updateStatus
in classBaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
-
handleReplace
protected T handleReplace(T item)
base replace operation, which is effectively a forced update with retries
-
patch
protected T patch(PatchContext context, T base, T item)
Perform a patch. If the base is not provided and one is required, it will be fetched from the server.
-
patchStatus
public T patchStatus()
- Specified by:
patchStatus
in interfaceNonDeletingOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Overrides:
patchStatus
in classBaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
-
patch
public T patch()
-
patch
public T patch(PatchContext patchContext)
-
patchStatus
public T patchStatus(T item)
- Specified by:
patchStatus
in interfaceItemWritableOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Overrides:
patchStatus
in classBaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
-
patch
public T patch(PatchContext patchContext, T item)
-
patch
public T patch(PatchContext patchContext, String patch)
-
newInstance
public HasMetadataOperation<T,L,R> newInstance(OperationContext context)
- Overrides:
newInstance
in classBaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
-
scale
public T scale(int count)
- Specified by:
scale
in interfaceExtensibleResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Specified by:
scale
in interfaceScalable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Specified by:
scale
in interfaceTimeoutableScalable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Overrides:
scale
in classBaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
-
scale
public T scale(int count, boolean wait)
-
scale
public io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scale(io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scaleParam)
-
waitUntilScaled
protected void waitUntilScaled(int count)
Let's wait until there are enough Ready pods.
-
-