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
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 |
patch(PatchContext patchContext,
T item) |
T |
replace(T t) |
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 |
updateImage(Map<String,String> containerToImageMap) |
T |
updateImage(String image) |
LogWatch |
watchLog() |
Loggable |
withLogWaitTimeout(Integer logWaitTimeout) |
protected abstract 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, patchStatus, replace, replace, replaceStatus, requireFromServer
appendListOptionParams, create, createOrReplace, createOrReplace, delete, delete, delete, deleteAll, dryRun, dryRun, edit, fetchListUrl, fieldManager, fieldValidation, forceConflicts, 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, replaceStatus, require, 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, 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
rollback
cascading, isReady, lockResourceVersion, lockResourceVersion, require
fromServer
withResourceVersion
waitUntilCondition, waitUntilReady
create, createOrReplace
accept, edit, edit, editStatus, patch, patch, patch, patch, patch, patchStatus
replace, replaceStatus
create, createOrReplace, delete, patchStatus, updateStatus
withGracePeriod
withPropagationPolicy
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
pause, restart, resume, undo
getFullResourceName, getName, getNamespace
delete
withLabel, withoutLabel
protected final PodOperationContext rollingOperationContext
protected RollableScalableResourceOperation(PodOperationContext context, OperationContext superContext, Class<T> type, Class<L> listType)
protected abstract 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)
public T patch(PatchContext patchContext, T item)
patch
in interface EditReplacePatchable<T extends io.fabric8.kubernetes.api.model.HasMetadata>
patch
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 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>
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>
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>
Copyright © 2015–2022 Red Hat. All rights reserved.