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>
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_GRACE_PERIOD_IN_SECONDS |
static io.fabric8.kubernetes.api.model.DeletionPropagation |
DEFAULT_PROPAGATION_POLICY |
apiVersion, listType
type
apiGroupName, apiGroupVersion, config, context, dryRun, httpClient, JSON, JSON_MAPPER, JSON_MERGE_PATCH, JSON_PATCH, name, namespace, resourceT, STRATEGIC_MERGE_JSON_PATCH
Constructor and Description |
---|
HasMetadataOperation(OperationContext ctx,
Class<T> type,
Class<L> listType) |
Modifier and Type | Method and Description |
---|---|
T |
accept(Consumer<T> consumer) |
T |
edit(UnaryOperator<T> function) |
T |
edit(io.fabric8.kubernetes.api.builder.Visitor... visitors) |
T |
editStatus(UnaryOperator<T> function) |
protected T |
modifyItemForReplaceOrPatch(Supplier<T> current,
T item)
Modify the item prior to a replace or a JSON patch diff
|
HasMetadataOperation<T,L,R> |
newInstance(OperationContext context) |
T |
patch(PatchContext patchContext,
String patch) |
T |
patch(PatchContext patchContext,
T item) |
protected T |
patch(PatchContext context,
T base,
T item,
boolean status) |
T |
patchStatus(T item) |
T |
replace() |
protected T |
replace(T item,
boolean status)
base replace operation, which is effectively a forced update with retries
|
T |
replaceStatus() |
protected T |
requireFromServer()
Get the current item from the server
Will always return non-null or throw an exception. |
appendListOptionParams, create, createOrReplace, createOrReplace, delete, delete, delete, dryRun, dryRun, edit, fetchListUrl, forOperationType, fromServer, get, getApiEndpointPath, getConfigType, getFieldQueryParam, getGracePeriodSeconds, getGroup, getItem, getKind, getLimit, getListType, getMandatory, getNonNullItem, getOperationType, getPlural, getPropagationPolicy, getReadiness, getResourceVersion, getVersion, getWatchReconnectInterval, handleCreate, handleDeploymentRollback, handleGet, handlePatch, handleResponse, handleScale, handleUpdate, inAnyNamespace, inform, informOnCondition, inNamespace, inWriteContext, isReady, isReloadingFromServer, isResourceNamespaced, list, list, list, load, load, load, load, lockResourceVersion, lockResourceVersion, newResource, patch, patch, patchStatus, replace, replaceStatus, require, resource, resources, runnableInformer, setListType, setType, submitList, submitWatch, updateApiVersion, updateApiVersion, 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
create, getType
addNamespacedUrlPathParts, assertResponseCode, checkName, checkNamespace, correctNamespace, createStatus, createStatus, getAPIGroupName, getAPIGroupVersion, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getObjectValueAsMap, getParameters, getResourceT, getResourceUrl, getResourceUrl, getResourceUrl, getResourceURLForPatchOperation, getResourceURLForWriteOperation, getRootUrlParts, handleApproveOrDeny, handleCreate, handleDelete, handleDeploymentRollback, handleGet, handleMetric, handlePatch, handlePatch, handleRawGet, handleResponse, handleResponse, handleScale, handleUpdate, requestException, requestException, requestFailure, requestFailure, restCall, retryWithExponentialBackoff, unmarshal, unmarshal, unmarshal, waitForResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFullResourceName, getName, getNamespace
delete
withLabel, withoutLabel
inform, inform
patch, patch
create
public static final io.fabric8.kubernetes.api.model.DeletionPropagation DEFAULT_PROPAGATION_POLICY
public static final long DEFAULT_GRACE_PERIOD_IN_SECONDS
public HasMetadataOperation(OperationContext ctx, Class<T> type, Class<L> listType)
public T edit(UnaryOperator<T> function)
public T editStatus(UnaryOperator<T> function)
editStatus
in interface EditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
editStatus
in class BaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
public T edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
protected T requireFromServer()
public T replace()
public T replaceStatus()
replaceStatus
in interface Replaceable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
replaceStatus
in class BaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
protected T modifyItemForReplaceOrPatch(Supplier<T> current, T item)
current
- item from the serveritem
- to be modifiedprotected T replace(T item, boolean status)
protected T patch(PatchContext context, T base, T item, boolean status)
public T patchStatus(T item)
patchStatus
in interface ItemWritableOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata>
patchStatus
in class BaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
public T patch(PatchContext patchContext, T item)
public T patch(PatchContext patchContext, String patch)
public HasMetadataOperation<T,L,R> newInstance(OperationContext context)
newInstance
in class BaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
Copyright © 2015–2022 Red Hat. All rights reserved.