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>
DEFAULT_GRACE_PERIOD_IN_SECONDS, DEFAULT_PROPAGATION_POLICY
apiVersion, listType, type
apiGroupName, apiGroupVersion, client, config, context, dryRun, JSON, JSON_MAPPER, JSON_MERGE_PATCH, JSON_PATCH, name, namespace, resourceT, STRATEGIC_MERGE_JSON_PATCH, YAML_MAPPER
DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_INITIAL_BACKOFF_MILLIS
POLL_INTERVAL_MS
Constructor and Description |
---|
RollableScalableResourceOperation(RollingOperationContext context) |
Modifier and Type | Method and Description |
---|---|
T |
edit(UnaryOperator<T> function) |
protected abstract int |
getCurrentReplicas(T current) |
protected abstract int |
getDesiredReplicas(T item) |
protected abstract long |
getObservedGeneration(T current) |
protected abstract RollingUpdater<T,L> |
getRollingUpdater(long rollingTimeout,
TimeUnit rollingTimeUnit) |
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 |
replace(T t) |
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 abstract T |
withReplicas(int count) |
accept, createVisitableBuilder, edit, editStatus, fromServer, patch, patch, patchStatus, replace, replaceStatus
cascading, create, create, createOrReplace, delete, delete, delete, dryRun, edit, fetchListUrl, forOperationType, fromServer, get, getApiVersion, getConfigType, getFieldQueryParam, getFields, getFieldsNot, getGracePeriodSeconds, getItem, getKind, getLabelQueryParam, getLabels, getLabelsIn, getLabelsNot, getLabelsNotIn, getListType, getMandatory, getOperationType, getPropagationPolicy, getReadiness, getResourceT, getResourceVersion, getRootPaths, getType, handleCreate, handleDeploymentRollback, handleGet, handlePatch, handlePatch, handleResponse, handleScale, handleUpdate, inAnyNamespace, inNamespace, isApiGroup, isCascading, isReady, isReloadingFromServer, isResourceNamespaced, list, list, list, load, load, load, load, lockResourceVersion, newInstance, require, sendPatchedObject, setListType, setNamespace, setType, updateApiVersion, updateApiVersion, updateStatus, waitUntilCondition, waitUntilReady, watch, watch, watch, withField, withFields, withGracePeriod, withInvolvedObject, withItem, withLabel, withLabel, withLabelIn, withLabelNotIn, withLabels, withLabelSelector, withName, withoutField, withoutFields, withoutLabel, withoutLabel, withoutLabels, withPropagationPolicy, withResourceVersion, withWaitRetryBackoff
assertResponseCode, checkName, checkNamespace, createStatus, createStatus, getAPIGroup, getAPIVersion, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getObjectValueAsMap, getResourceUrl, getResourceUrl, getResourceUrl, getResourceURLForPatchOperation, getResourceURLForWriteOperation, getRootUrl, handleCreate, handleDelete, handleDelete, handleDeploymentRollback, handleGet, handleGet, handleMetric, handlePatch, handlePatch, handlePatch, handleResponse, handleResponse, handleResponse, handleResponse, handleScale, handleUpdate, handleUpdate, requestException, requestFailure, unmarshal, unmarshal, unmarshal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createOrReplace
create, create
fromServer
updateStatus
editStatus
replaceStatus
patchStatus
withGracePeriod
withPropagationPolicy
lockResourceVersion
waitUntilCondition, waitUntilReady, withWaitRetryBackoff
withResourceVersion
dryRun, dryRun
require
getLog, getLog, getLogReader, watchLog, watchLog, withLogWaitTimeout
getName, getNamespace
public RollableScalableResourceOperation(RollingOperationContext context)
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)
public T scale(int count, boolean wait)
public io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scale()
public io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scale(io.fabric8.kubernetes.api.model.autoscaling.v1.Scale scaleParam)
public T edit(UnaryOperator<T> function)
public T patch(PatchContext patchContext, T item)
Patchable
PatchContext
(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>
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>>
patchContext
- PatchContext
for patch requestitem
- item to be patched with patched valuesCopyright © 2015–2021 Red Hat. All rights reserved.