public abstract class RollableScalableResourceOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>> extends HasMetadataOperation<T,L,R> implements RollableScalableResource<T>, TimeoutImageEditReplacePatchable<T>
FieldValidateable.Validation
Modifier and Type | Field and Description |
---|---|
protected PodOperationContext |
rollingOperationContext |
DEFAULT_GRACE_PERIOD_IN_SECONDS, 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, subresource
Modifier | Constructor and Description |
---|---|
protected |
RollableScalableResourceOperation(PodOperationContext context,
OperationContext superContext,
Class<T> type,
Class<L> listType) |
Modifier and Type | Method and Description |
---|---|
T |
edit(UnaryOperator<T> function) |
protected abstract List<io.fabric8.kubernetes.api.model.Container> |
getContainers(T value) |
protected abstract int |
getCurrentReplicas(T current) |
protected abstract int |
getDesiredReplicas(T item) |
String |
getLog() |
protected abstract long |
getObservedGeneration(T current) |
protected abstract RollingUpdater<T,L> |
getRollingUpdater(long rollingTimeout,
TimeUnit rollingTimeUnit) |
Loggable |
inContainer(String id) |
abstract RollableScalableResourceOperation<T,L,R> |
newInstance(PodOperationContext context,
OperationContext superContext) |
T |
pause() |
T |
restart() |
T |
resume() |
TimeoutImageEditReplacePatchable<T> |
rolling() |
io.fabric8.kubernetes.api.model.autoscaling.v1.Scale |
scale() |
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) |
protected T |
sendPatchedObject(T oldObject,
T updatedObject) |
T |
undo() |
T |
updateImage(Map<String,String> containerToImageMap) |
T |
updateImage(String image) |
LogWatch |
watchLog() |
Loggable |
withLogWaitTimeout(Integer logWaitTimeout) |
Loggable |
withReadyWaitTimeout(Integer timeout) |
protected T |
withReplicas(int count) |
RollableScalableResourceOperation<T,L,R> |
withTimeout(long timeout,
TimeUnit unit) |
RollableScalableResourceOperation<T,L,R> |
withTimeoutInMillis(long timeoutInMillis) |
accept, edit, editStatus, modifyItemForReplaceOrPatch, newInstance, patch, patch, patch, patch, patch, patchStatus, patchStatus, replace, replace, replaceStatus, update, update, updateStatus
appendListOptionParams, create, 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, 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, getOperationContext, getRequestConfig, 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, unmarshal, unmarshal, unmarshal, waitForResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
rollback
cascading, isReady, item, lockResourceVersion, lockResourceVersion, require
fromServer
withResourceVersion
waitUntilCondition, waitUntilReady
create, createOrReplace
accept, edit, edit, editStatus, patch, patch, patch, patch, patch, patch, patchStatus
replace, replaceStatus, update, updateStatus
create, createOrReplace, delete, patchStatus, updateStatus
withGracePeriod
withPropagationPolicy
replace, replaceStatus
fieldManager, forceConflicts, serverSideApply
fieldValidation
dryRun, dryRun
inform, inform, inform, informOnCondition, runnableInformer, withIndexers, withLimit
usingTimestamps
limitBytes, terminated
sinceSeconds, sinceTime
tailingLines
withPrettyOutput
getLog, getLogInputStream, getLogReader, watchLog
getFullResourceName, getName, getNamespace
delete
withLabel, withoutLabel
protected final PodOperationContext rollingOperationContext
protected RollableScalableResourceOperation(PodOperationContext context, OperationContext superContext, Class<T> type, Class<L> listType)
protected final T withReplicas(int count)
protected abstract RollingUpdater<T,L> getRollingUpdater(long rollingTimeout, TimeUnit rollingTimeUnit)
protected abstract int getCurrentReplicas(T current)
protected abstract int getDesiredReplicas(T item)
protected abstract long getObservedGeneration(T current)
public T scale(int count)
scale
in interface ScalableResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public T scale(int count, boolean wait)
scale
in interface ScalableResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scale()
scale
in interface ScalableResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scale(io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scaleParam)
scale
in interface ScalableResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public T edit(UnaryOperator<T> function)
edit
in interface EditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
edit
in interface ImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
edit
in class HasMetadataOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>>
public abstract RollableScalableResourceOperation<T,L,R> newInstance(PodOperationContext context, OperationContext superContext)
public Loggable withLogWaitTimeout(Integer logWaitTimeout)
withLogWaitTimeout
in interface Loggable
public Loggable withReadyWaitTimeout(Integer timeout)
withReadyWaitTimeout
in interface Loggable
public Loggable inContainer(String id)
inContainer
in interface Containerable<String,Loggable>
public TimeoutImageEditReplacePatchable<T> rolling()
rolling
in interface RollableScalableResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public T updateImage(String image)
updateImage
in interface ImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
updateImage
in interface ImageUpdateable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
protected abstract List<io.fabric8.kubernetes.api.model.Container> getContainers(T value)
public T updateImage(Map<String,String> containerToImageMap)
updateImage
in interface ImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
updateImage
in interface ImageUpdateable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public RollableScalableResourceOperation<T,L,R> withTimeout(long timeout, TimeUnit unit)
withTimeout
in interface DeletableWithOptions
withTimeout
in interface Timeoutable
withTimeout
in interface TimeoutImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
withTimeout
in interface ExtensibleResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
withTimeout
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 RollableScalableResourceOperation<T,L,R> withTimeoutInMillis(long timeoutInMillis)
withTimeoutInMillis
in interface DeletableWithOptions
withTimeoutInMillis
in interface Timeoutable
withTimeoutInMillis
in interface TimeoutImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
withTimeoutInMillis
in interface ExtensibleResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public T pause()
pause
in interface ImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
pause
in interface TimeoutImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public T resume()
resume
in interface ImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
resume
in interface TimeoutImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public T restart()
restart
in interface ImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
restart
in interface TimeoutImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
public T undo()
undo
in interface ImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
undo
in interface TimeoutImageEditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
Copyright © 2015–2023 Red Hat. All rights reserved.