public class BaseOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>> extends CreateOnlyResourceOperation<T,T> implements OperationInfo, MixedOperation<T,L,R>, Resource<T>, ListerWatcher<T,L>
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiVersion |
protected Class<L> |
listType |
typeapiGroupName, apiGroupVersion, config, context, dryRun, httpClient, JSON, JSON_MAPPER, JSON_MERGE_PATCH, JSON_PATCH, name, namespace, resourceT, STRATEGIC_MERGE_JSON_PATCHDEFAULT_BACKOFF_MULTIPLIER, DEFAULT_INITIAL_BACKOFF_MILLIS| Modifier | Constructor and Description |
|---|---|
protected |
BaseOperation(OperationContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
T |
accept(Consumer<T> consumer)
Issues a JSON patch against the item based upon the changes made by the function provided as argument
|
static URL |
appendListOptionParams(URL base,
io.fabric8.kubernetes.api.model.ListOptions listOptions) |
EditReplacePatchDeletable<T> |
cascading(boolean cascading)
deletes dependent resources.
|
T |
createOrReplace(T... items)
Creates a provided resource in a Kubernetes Cluster.
|
Boolean |
delete()
Deletes resource and all managed resources, returns null or false if not found.
|
Boolean |
delete(List<T> items) |
Boolean |
delete(T... items) |
WritableOperation<T> |
dryRun(boolean isDryRun)
Indicates whether modifications should not be persisted or not.
|
<V> T |
edit(Class<V> visitorType,
io.fabric8.kubernetes.api.builder.Visitor<V> visitor)
Issues a JSON patch against the item based upon the changes made to the object by the visitor.
|
T |
edit(UnaryOperator<T> function)
Issues a JSON patch against the item based upon the changes made to the object returned by the function.
|
T |
edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
Issues a JSON patch against the item based upon the changes made to the object by the visitors.
|
T |
editStatus(UnaryOperator<T> function) |
protected URL |
fetchListUrl(URL url,
io.fabric8.kubernetes.api.model.ListOptions listOptions) |
OperationInfo |
forOperationType(String type) |
Gettable<T> |
fromServer() |
T |
get() |
protected Class<? extends Config> |
getConfigType() |
String |
getFieldQueryParam() |
Long |
getGracePeriodSeconds() |
String |
getGroup() |
T |
getItem() |
String |
getKind() |
String |
getLabelQueryParam() |
Long |
getLimit() |
Class<L> |
getListType() |
T |
getMandatory() |
String |
getOperationType() |
String |
getPlural() |
io.fabric8.kubernetes.api.model.DeletionPropagation |
getPropagationPolicy() |
Readiness |
getReadiness() |
String |
getResourceVersion() |
String |
getVersion() |
protected T |
handleCreate(T resource) |
protected io.fabric8.kubernetes.api.model.Status |
handleDeploymentRollback(io.fabric8.kubernetes.api.model.extensions.DeploymentRollback deploymentRollback) |
protected T |
handleGet(URL resourceUrl) |
protected T |
handlePatch(PatchContext context,
T current,
T updated,
boolean status) |
protected T |
handlePatch(T current,
Map<String,Object> patchedUpdate) |
protected T |
handleResponse(HttpRequest.Builder requestBuilder) |
protected io.fabric8.kubernetes.api.model.autoscaling.v1.Scale |
handleScale(io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scaleParam) |
protected T |
handleUpdate(T updated,
boolean status) |
NonNamespaceOperation<T,L,R> |
inAnyNamespace() |
SharedIndexInformer<T> |
inform(ResourceEventHandler<? super T> handler,
long resync)
Similar to a
Watch, but will attempt to handle failures after successfully started. |
CompletableFuture<List<T>> |
informOnCondition(Predicate<List<T>> condition)
|
NonNamespaceOperation<T,L,R> |
inNamespace(String namespace) |
Boolean |
isCascading() |
boolean |
isReady()
Check if the resource is ready.
|
Boolean |
isReloadingFromServer() |
boolean |
isResourceNamespaced() |
L |
list() |
L |
list(Integer limitVal,
String continueVal)
List resources from APIServer.
|
L |
list(io.fabric8.kubernetes.api.model.ListOptions listOptions)
List resource from Kubernetes API server.
|
R |
load(File file)
Load from a
File. |
R |
load(InputStream is)
Load from an
InputStream. |
R |
load(String path)
Load from path.
|
R |
load(URL url)
Load from a
URL. |
ReplaceDeletable<T> |
lockResourceVersion(String resourceVersion) |
BaseOperation<T,L,R> |
newInstance(OperationContext context) |
T |
patch(PatchContext patchContext,
String patch)
Update field(s) of a resource using type specified in
PatchContext(defaults to strategic merge if not specified). |
T |
patch(PatchContext patchContext,
T item)
Update field(s) of a resource using type specified in
PatchContext(defaults to strategic merge if not specified). |
T |
patchStatus(T item)
Does a PATCH request to the /status subresource ignoring changes to anything except the status stanza.
|
T |
replace(T item)
Replace the server's state with the given item.
|
T |
replaceStatus(T item)
Similar to
Replaceable.replace(Object), but only affects the status subresource |
T |
require() |
SharedIndexInformer<T> |
runnableInformer(long resync)
Similar to a
Watch, but will attempt to handle failures after successfully started. |
protected T |
sendPatchedObject(T oldObject,
T updatedObject) |
void |
setListType(Class<L> listType) |
void |
setNamespace(String namespace) |
void |
setType(Class<T> type) |
protected void |
updateApiVersion(io.fabric8.kubernetes.api.model.HasMetadata hasMetadata)
Updates the resource if it has missing or default apiGroupVersion values and the resource is currently
using API Groups with custom version strings
|
protected void |
updateApiVersion(io.fabric8.kubernetes.api.model.KubernetesResourceList<T> list)
Updates the list items if they have missing or default apiGroupVersion values and the resource is currently
using API Groups with custom version strings
|
T |
updateStatus(T item)
When the status subresource is enabled, the /status subresource for the custom resource is exposed.
|
T |
waitUntilCondition(Predicate<T> condition,
long amount,
TimeUnit timeUnit) |
T |
waitUntilReady(long amount,
TimeUnit timeUnit) |
Watch |
watch(io.fabric8.kubernetes.api.model.ListOptions options,
Watcher<T> watcher)
Watch returns
Watch interface that watches requested resource |
Watch |
watch(String resourceVersion,
Watcher<T> watcher)
Watch returns
Watch interface that watches requested resource from
specified resourceVersion |
Watch |
watch(Watcher<T> watcher)
Watch returns
Watch interface that watches requested resource |
FilterWatchListDeletable<T,L> |
withField(String key,
String value) |
FilterWatchListDeletable<T,L> |
withFields(Map<String,String> fields) |
FilterWatchListDeletable<T,L> |
withGracePeriod(long gracePeriodSeconds)
The duration in seconds before the object should be deleted.
|
Informable<T> |
withIndexers(Map<String,Function<T,List<String>>> indexers)
The indexers to add to
SharedInformers created by subsequent inform calls; |
FilterWatchListDeletable<T,L> |
withInvolvedObject(io.fabric8.kubernetes.api.model.ObjectReference objectReference)
Filter with the object that this event is about.
|
BaseOperation<T,L,R> |
withItem(T item) |
FilterWatchListDeletable<T,L> |
withLabel(String key,
String value) |
FilterWatchListDeletable<T,L> |
withLabelIn(String key,
String... values) |
FilterWatchListDeletable<T,L> |
withLabelNotIn(String key,
String... values) |
FilterWatchListDeletable<T,L> |
withLabels(Map<String,String> labels) |
FilterWatchListDeletable<T,L> |
withLabelSelector(io.fabric8.kubernetes.api.model.LabelSelector selector) |
FilterWatchListDeletable<T,L> |
withLabelSelector(String selectorAsString) |
BaseOperation<T,L,R> |
withLimit(Long limit)
Set the limit to the number of resources to list at one time.
|
R |
withName(String name) |
FilterNested<FilterWatchListDeletable<T,L>> |
withNewFilter()
Accumulate a filter on the context, when done
FilterNested.endFilter() or and must be called |
FilterWatchListDeletable<T,L> |
withoutField(String key,
String value) |
FilterWatchListDeletable<T,L> |
withoutFields(Map<String,String> fields) |
FilterWatchListDeletable<T,L> |
withoutLabel(String key,
String value) |
FilterWatchListDeletable<T,L> |
withoutLabels(Map<String,String> labels) |
EditReplacePatchDeletable<T> |
withPropagationPolicy(io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy)
Whether and how garbage collection will be performed.
|
BaseOperation<T,L,R> |
withResourceVersion(String resourceVersion) |
BaseOperation<T,L,R> |
withWaitRetryBackoff(long initialBackoff,
TimeUnit backoffUnit,
double backoffMultiplier)
Configure the backoff strategy to use when waiting for conditions, in case the watcher encounters a retryable error.
|
create, create, getTypeassertResponseCode, checkName, checkNamespace, createStatus, createStatus, getAPIGroupName, getAPIGroupVersion, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getObjectValueAsMap, getResourceT, getResourceUrl, getResourceUrl, getResourceUrl, getResourceURLForPatchOperation, getResourceURLForWriteOperation, getRootUrl, handleCreate, handleDelete, handleDelete, handleDeploymentRollback, handleGet, handleGet, handleMetric, handlePatch, handlePatch, handlePatch, handleRawGet, handleResponse, handleResponse, handleResponse, handleResponse, handleScale, handleUpdate, handleUpdate, requestException, requestException, requestFailure, requestFailure, restCall, retryWithExponentialBackoff, unmarshal, unmarshal, unmarshalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFullResourceName, getName, getNamespacewithLabel, withoutLabelinform, informdryRuncreate, creategetNamespaceprotected String apiVersion
protected BaseOperation(OperationContext ctx)
public BaseOperation<T,L,R> newInstance(OperationContext context)
protected URL fetchListUrl(URL url, io.fabric8.kubernetes.api.model.ListOptions listOptions)
public T get()
public T require()
require in interface Requirable<T extends io.fabric8.kubernetes.api.model.HasMetadata>public T getMandatory()
public T edit(UnaryOperator<T> function)
EditableIt is generally convenient to use a Builder constructed off of the item.
public T editStatus(UnaryOperator<T> function)
editStatus in interface StatusEditable<T extends io.fabric8.kubernetes.api.model.HasMetadata>public T edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
Editablepublic <V> T edit(Class<V> visitorType, io.fabric8.kubernetes.api.builder.Visitor<V> visitor)
Editablepublic T accept(Consumer<T> consumer)
Editablepublic ReplaceDeletable<T> lockResourceVersion(String resourceVersion)
lockResourceVersion in interface Lockable<ReplaceDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata>>public NonNamespaceOperation<T,L,R> inNamespace(String namespace)
inNamespace in interface Namespaceable<NonNamespaceOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>>public NonNamespaceOperation<T,L,R> inAnyNamespace()
inAnyNamespace in interface AnyNamespaceable<FilterWatchListMultiDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public EditReplacePatchDeletable<T> cascading(boolean cascading)
Cascadingcascading in interface Cascading<EditReplacePatchDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata>>cascading - whether dependents should be orphaned or not.public R load(InputStream is)
LoadableInputStream.public Gettable<T> fromServer()
fromServer in interface FromServerable<Gettable<T extends io.fabric8.kubernetes.api.model.HasMetadata>>@SafeVarargs public final T createOrReplace(T... items)
CreateOrReplaceablecreateOrReplace in interface CreateOrReplaceable<T extends io.fabric8.kubernetes.api.model.HasMetadata>items - to create or replacepublic FilterWatchListDeletable<T,L> withLabels(Map<String,String> labels)
withLabels in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withLabelSelector(io.fabric8.kubernetes.api.model.LabelSelector selector)
withLabelSelector in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withoutLabels(Map<String,String> labels)
withoutLabels in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withLabelIn(String key, String... values)
withLabelIn in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withLabelNotIn(String key, String... values)
withLabelNotIn in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withLabel(String key, String value)
withLabel in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withoutLabel(String key, String value)
withoutLabel in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withLabelSelector(String selectorAsString)
withLabelSelector in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withFields(Map<String,String> fields)
withFields in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withField(String key, String value)
withField in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withInvolvedObject(io.fabric8.kubernetes.api.model.ObjectReference objectReference)
FilterablewithInvolvedObject in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>objectReference - ObjectReference for providing information of referred objectpublic FilterNested<FilterWatchListDeletable<T,L>> withNewFilter()
FilterWatchListDeletableFilterNested.endFilter() or and must be calledwithNewFilter in interface FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>FilterNestedpublic FilterWatchListDeletable<T,L> withoutFields(Map<String,String> fields)
withoutFields in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public FilterWatchListDeletable<T,L> withoutField(String key, String value)
withoutField in interface Filterable<FilterWatchListDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>>public String getFieldQueryParam()
public String getLabelQueryParam()
public L list()
public L list(Integer limitVal, String continueVal)
Listablepublic L list(io.fabric8.kubernetes.api.model.ListOptions listOptions)
ListableThe passed in options may be modified as a side-effect of this call.
Values that already exist at this context, such as the labels and fields will be overridden
on the passed in options regardless of initial values.
list in interface Listable<L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>list in interface ListerWatcher<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>listOptions - ListOptions is the query options to a standard REST list call.public Boolean delete()
Deletable@SafeVarargs public final Boolean delete(T... items)
delete in interface MultiDeleteable<T extends io.fabric8.kubernetes.api.model.HasMetadata>public Boolean delete(List<T> items)
delete in interface MultiDeleteable<T extends io.fabric8.kubernetes.api.model.HasMetadata>public T updateStatus(T item)
StatusUpdatableupdateStatus in interface StatusUpdatable<T extends io.fabric8.kubernetes.api.model.HasMetadata>item - kubernetes objectpublic T patchStatus(T item)
StatusPatchableThis method has the same patching behavior as Patchable.patch(PatchContext, Object), with PatchType.JSON_MERGE but against the status subresource.
Set the resourceVersion to null to prevent optimistic locking.
patchStatus in interface StatusPatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>item - kubernetes objectpublic BaseOperation<T,L,R> withItem(T item)
public BaseOperation<T,L,R> withResourceVersion(String resourceVersion)
withResourceVersion in interface Versionable<WatchAndWaitable<T extends io.fabric8.kubernetes.api.model.HasMetadata>>public Watch watch(Watcher<T> watcher)
WatchableWatch interface that watches requested resourcepublic Watch watch(String resourceVersion, Watcher<T> watcher)
WatchableWatch interface that watches requested resource from
specified resourceVersionpublic Watch watch(io.fabric8.kubernetes.api.model.ListOptions options, Watcher<T> watcher)
WatchableWatch interface that watches requested resource
The passed in options may be modified as a side-effect of this call.
Values that already exist at this context, such as the labels, fields,
and resourceVersion will be overridden on the passed in options regardless of initial values.
watch in interface Watchable<Watcher<T extends io.fabric8.kubernetes.api.model.HasMetadata>>watch in interface ListerWatcher<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>options - options available for watch operationwatcher - Watcher interface of Kubernetes resourceWatchpublic T replace(T item)
ReplaceableIf Lockable.lockResourceVersion(String) has been used to lock the resourceVersion,
this operation is effectively a single update attempt against that version.
If Lockable.lockResourceVersion(String) has not been called, this operation
will be retried a number of times in the event of a conflict. If a resourceVersion has been set
on the item, the first update attempt will be made against that version. Subsequent attempts will fetch
the latest resourceVersion from the server.
replace in interface Replaceable<T extends io.fabric8.kubernetes.api.model.HasMetadata>item - with the replacement statepublic T replaceStatus(T item)
StatusReplaceableReplaceable.replace(Object), but only affects the status subresourcereplaceStatus in interface StatusReplaceable<T extends io.fabric8.kubernetes.api.model.HasMetadata>item - with the status subresourcepublic T patch(PatchContext patchContext, String patch)
PatchablePatchContext(defaults to strategic merge if not specified).patch in interface Patchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>patchContext - PatchContext for patch requestpatch - The patch to be applied to the resource JSON file.public T patch(PatchContext patchContext, T item)
PatchablePatchContext(defaults to strategic merge if not specified).
PatchType.JSON - will create a JSON patch against the current item.
WARNING: This may overwrite concurrent changes (between when you obtained your item and the current state) in an unexpected way.
Consider using edit instead.
PatchType.JSON_MERGE - will send the serialization of the item as a JSON MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
PatchType.STRATEGIC_MERGE - will send the serialization of the item as a STRATEGIC MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
patch in interface Patchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>patchContext - PatchContext for patch requestitem - to be patched with patched valuespublic boolean isResourceNamespaced()
isResourceNamespaced in class OperationSupportprotected T handleResponse(HttpRequest.Builder requestBuilder) throws InterruptedException, IOException
InterruptedExceptionIOExceptionprotected T handleCreate(T resource) throws InterruptedException, IOException
handleCreate in class CreateOnlyResourceOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,T extends io.fabric8.kubernetes.api.model.HasMetadata>InterruptedExceptionIOExceptionprotected T handleUpdate(T updated, boolean status) throws InterruptedException, IOException
InterruptedExceptionIOExceptionprotected T handlePatch(PatchContext context, T current, T updated, boolean status) throws InterruptedException, IOException
InterruptedExceptionIOExceptionprotected T handlePatch(T current, Map<String,Object> patchedUpdate) throws InterruptedException, IOException
InterruptedExceptionIOExceptionprotected io.fabric8.kubernetes.api.model.autoscaling.v1.Scale handleScale(io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scaleParam)
protected io.fabric8.kubernetes.api.model.Status handleDeploymentRollback(io.fabric8.kubernetes.api.model.extensions.DeploymentRollback deploymentRollback)
protected T handleGet(URL resourceUrl) throws InterruptedException, IOException
InterruptedExceptionIOExceptionpublic Boolean isCascading()
public T getItem()
getItem in class CreateOnlyResourceOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,T extends io.fabric8.kubernetes.api.model.HasMetadata>public String getResourceVersion()
public Boolean isReloadingFromServer()
public Long getGracePeriodSeconds()
public io.fabric8.kubernetes.api.model.DeletionPropagation getPropagationPolicy()
public String getKind()
getKind in interface OperationInfopublic String getGroup()
getGroup in interface OperationInfopublic String getPlural()
getPlural in interface OperationInfopublic String getVersion()
getVersion in interface OperationInfopublic String getOperationType()
getOperationType in interface OperationInfopublic OperationInfo forOperationType(String type)
forOperationType in interface OperationInfopublic FilterWatchListDeletable<T,L> withGracePeriod(long gracePeriodSeconds)
GracePeriodConfigurablewithGracePeriod in interface GracePeriodConfigurable<Deletable>gracePeriodSeconds - grace period integer value in secondspublic EditReplacePatchDeletable<T> withPropagationPolicy(io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy)
PropagationPolicyConfigurableThe 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.
withPropagationPolicy in interface PropagationPolicyConfigurable<EditReplacePatchDeletable<T extends io.fabric8.kubernetes.api.model.HasMetadata>>propagationPolicy - propagation policy in form of string DeletionPropagationpublic BaseOperation<T,L,R> withWaitRetryBackoff(long initialBackoff, TimeUnit backoffUnit, double backoffMultiplier)
WaitablewithWaitRetryBackoff in interface Waitable<T extends io.fabric8.kubernetes.api.model.HasMetadata,T extends io.fabric8.kubernetes.api.model.HasMetadata>initialBackoff - the value for the initial backoff on first errorbackoffUnit - the TimeUnit for the initial backoff valuebackoffMultiplier - what to multiply the backoff by on each subsequent errorprotected void updateApiVersion(io.fabric8.kubernetes.api.model.KubernetesResourceList<T> list)
list - Kubernetes resource listprotected void updateApiVersion(io.fabric8.kubernetes.api.model.HasMetadata hasMetadata)
hasMetadata - object whose api version needs to be updatedpublic Readiness getReadiness()
public final boolean isReady()
Readiablepublic T waitUntilReady(long amount, TimeUnit timeUnit)
waitUntilReady in interface Waitable<T extends io.fabric8.kubernetes.api.model.HasMetadata,T extends io.fabric8.kubernetes.api.model.HasMetadata>public T waitUntilCondition(Predicate<T> condition, long amount, TimeUnit timeUnit)
waitUntilCondition in interface Waitable<T extends io.fabric8.kubernetes.api.model.HasMetadata,T extends io.fabric8.kubernetes.api.model.HasMetadata>public CompletableFuture<List<T>> informOnCondition(Predicate<List<T>> condition)
InformableFuture when the list at this context satisfies the given Predicate.
The predicate will be tested against the state of the underlying informer store on every event.
The returned future should be cancelled by the caller if not waiting for completion to close the underlying informerinformOnCondition in interface Informable<T extends io.fabric8.kubernetes.api.model.HasMetadata>condition - the Predicate to testCompletableFuture of the list of items after the condition is metpublic void setNamespace(String namespace)
public WritableOperation<T> dryRun(boolean isDryRun)
DryRunabledryRun in interface DryRunable<WritableOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata>>isDryRun - whether dry run is enabled or disabledpublic Informable<T> withIndexers(Map<String,Function<T,List<String>>> indexers)
InformableSharedInformers created by subsequent inform calls;withIndexers in interface Informable<T extends io.fabric8.kubernetes.api.model.HasMetadata>indexers - to customize the indexingInformablepublic BaseOperation<T,L,R> withLimit(Long limit)
InformableIf 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."
withLimit in interface Informable<T extends io.fabric8.kubernetes.api.model.HasMetadata>limit - of a items in a list fetchInformablepublic Long getLimit()
getLimit in interface ListerWatcher<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>public SharedIndexInformer<T> inform(ResourceEventHandler<? super T> handler, long resync)
InformableWatch, but will attempt to handle failures after successfully started.
and provides a store of all the current resources.
This call will be blocking for the initial list and watch.
You are expected to call stop to terminate the underlying Watch.
Additional handlers can be added, but processing of the events will be in the websocket thread, so consider non-blocking handler operations for more than one handler.
inform in interface Informable<T extends io.fabric8.kubernetes.api.model.HasMetadata>handler - to notifyresync - the resync period or 0 for no resyncSharedIndexInformerpublic SharedIndexInformer<T> runnableInformer(long resync)
InformableWatch, but will attempt to handle failures after successfully started.
and provides a store of all the current resources.
You are expected to call stop to terminate the underlying Watch.
Additional handlers can be added, but processing of the events will be in the websocket thread, so consider non-blocking handler operations for more than one handler.
runnableInformer in interface Informable<T extends io.fabric8.kubernetes.api.model.HasMetadata>resync - the resync period or 0 for no resyncSharedIndexInformerCopyright © 2015–2022 Red Hat. All rights reserved.