public class DeploymentOperationsImpl extends RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>> implements TimeoutImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEPLOYMENT_KUBERNETES_IO_REVISION |
DEFAULT_GRACE_PERIOD_IN_SECONDS, DEFAULT_PROPAGATION_POLICYapiVersion, listType, typeapiGroupName, apiGroupVersion, client, config, context, dryRun, JSON, JSON_MAPPER, JSON_MERGE_PATCH, JSON_PATCH, name, namespace, resourceT, STRATEGIC_MERGE_JSON_PATCH, YAML_MAPPERDEFAULT_BACKOFF_MULTIPLIER, DEFAULT_INITIAL_BACKOFF_MILLISPOLL_INTERVAL_MS| Constructor and Description |
|---|
DeploymentOperationsImpl(okhttp3.OkHttpClient client,
Config config) |
DeploymentOperationsImpl(okhttp3.OkHttpClient client,
Config config,
String namespace) |
DeploymentOperationsImpl(RollingOperationContext context) |
| Modifier and Type | Method and Description |
|---|---|
io.fabric8.kubernetes.api.model.extensions.Deployment |
accept(Consumer<io.fabric8.kubernetes.api.model.extensions.Deployment> consumer)
Issues a JSON patch against the item based upon the changes made by the function provided as argument
|
io.fabric8.kubernetes.api.model.extensions.Deployment |
edit(UnaryOperator<io.fabric8.kubernetes.api.model.extensions.Deployment> function)
Issues a JSON patch against the item based upon the changes made to the object returned by the function.
|
int |
getCurrentReplicas(io.fabric8.kubernetes.api.model.extensions.Deployment current) |
int |
getDesiredReplicas(io.fabric8.kubernetes.api.model.extensions.Deployment item) |
String |
getLog()
Get logs of a resource
|
String |
getLog(Boolean isPretty)
Get logs with pretty enabled
|
Reader |
getLogReader()
Returns an unclosed Reader.
|
long |
getObservedGeneration(io.fabric8.kubernetes.api.model.extensions.Deployment current) |
RollingUpdater<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList> |
getRollingUpdater(long rollingTimeout,
TimeUnit rollingTimeUnit) |
Loggable<LogWatch> |
inContainer(String id)
Get logs of a specific container
|
DeploymentOperationsImpl |
newInstance(OperationContext context) |
io.fabric8.kubernetes.api.model.extensions.Deployment |
patch(PatchContext patchContext,
io.fabric8.kubernetes.api.model.extensions.Deployment item)
Update field(s) of a resource using type specified in
PatchContext(defaults to strategic merge if not specified). |
io.fabric8.kubernetes.api.model.extensions.Deployment |
pause()
Mark the provided resource as paused
|
io.fabric8.kubernetes.api.model.extensions.Deployment |
replace(io.fabric8.kubernetes.api.model.extensions.Deployment item)
Replace the server's state with the given item.
|
io.fabric8.kubernetes.api.model.extensions.Deployment |
restart()
Restart a resource.
|
io.fabric8.kubernetes.api.model.extensions.Deployment |
resume()
Resume a paused resource.
|
io.fabric8.kubernetes.api.model.Status |
rollback(io.fabric8.kubernetes.api.model.extensions.DeploymentRollback rollback) |
DeploymentOperationsImpl |
rolling() |
io.fabric8.kubernetes.api.model.extensions.Deployment |
scale(int count) |
io.fabric8.kubernetes.api.model.extensions.Deployment |
scale(int count,
boolean wait) |
io.fabric8.kubernetes.api.model.extensions.Deployment |
undo()
Rollback to previous rollout.
|
io.fabric8.kubernetes.api.model.extensions.Deployment |
updateImage(Map<String,String> containerToImageMap)
Update existing container image(s) of resources
|
io.fabric8.kubernetes.api.model.extensions.Deployment |
updateImage(String image)
Update existing container image of single container resource
|
LogWatch |
watchLog()
Watch logs of a resource
|
LogWatch |
watchLog(OutputStream out)
Watch logs of resource and put them inside OutputStream inside
|
Loggable<LogWatch> |
withLogWaitTimeout(Integer logWaitTimeout)
While waiting for Pod logs, how long shall we wait until a Pod
becomes ready and starts producing logs
|
io.fabric8.kubernetes.api.model.extensions.Deployment |
withReplicas(int count) |
ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment> |
withTimeout(long timeout,
TimeUnit unit) |
ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment> |
withTimeoutInMillis(long timeoutInMillis) |
scale, scalecreateVisitableBuilder, edit, editStatus, modifyItemForReplaceOrPatch, patch, patch, patchStatus, replace, replaceStatus, requireFromServer, requireFromServercascading, create, create, createOrReplace, delete, delete, delete, dryRun, edit, fetchListUrl, forOperationType, fromServer, get, getConfigType, getFieldQueryParam, getGracePeriodSeconds, getItem, getKind, getLabelQueryParam, getListType, getMandatory, getOperationType, getPropagationPolicy, getReadiness, getResourceT, getResourceVersion, getRootPaths, getType, handleCreate, handleDeploymentRollback, handleGet, handlePatch, handlePatch, handleResponse, handleScale, handleUpdate, inAnyNamespace, inform, informOnCondition, inNamespace, isCascading, isReady, isReloadingFromServer, isResourceNamespaced, list, list, list, load, load, load, load, lockResourceVersion, require, sendPatchedObject, setListType, setNamespace, setType, updateApiVersion, updateApiVersion, updateStatus, waitUntilCondition, waitUntilReady, watch, watch, watch, withField, withFields, withGracePeriod, withIndexers, withInvolvedObject, withItem, withLabel, withLabelIn, withLabelNotIn, withLabels, withLabelSelector, withName, withNewFilter, withoutField, withoutFields, withoutLabel, withoutLabels, withPropagationPolicy, withResourceVersion, withWaitRetryBackoffassertResponseCode, checkName, checkNamespace, createStatus, createStatus, getAPIGroupName, getAPIGroupVersion, 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, retryWithExponentialBackoff, unmarshal, unmarshal, unmarshalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateStatuseditStatusreplaceStatuspatchStatuscreateOrReplacecreate, createfromServerwithGracePeriodwithPropagationPolicylockResourceVersionwaitUntilCondition, waitUntilReady, withWaitRetryBackoffwithResourceVersiondryRun, dryRunrequireinform, inform, inform, informOnCondition, withIndexersgetName, getNamespacewithLabel, withoutLabelpublic static final String DEPLOYMENT_KUBERNETES_IO_REVISION
public DeploymentOperationsImpl(okhttp3.OkHttpClient client,
Config config)
public DeploymentOperationsImpl(okhttp3.OkHttpClient client,
Config config,
String namespace)
public DeploymentOperationsImpl(RollingOperationContext context)
public DeploymentOperationsImpl newInstance(OperationContext context)
newInstance in class BaseOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public io.fabric8.kubernetes.api.model.extensions.Deployment scale(int count)
scale in interface Scaleable<io.fabric8.kubernetes.api.model.extensions.Deployment>scale in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public io.fabric8.kubernetes.api.model.extensions.Deployment scale(int count,
boolean wait)
scale in interface Scaleable<io.fabric8.kubernetes.api.model.extensions.Deployment>scale in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public io.fabric8.kubernetes.api.model.extensions.Deployment edit(UnaryOperator<io.fabric8.kubernetes.api.model.extensions.Deployment> function)
EditableIt is generally convenient to use a Builder constructed off of the item.
edit in interface Editable<io.fabric8.kubernetes.api.model.extensions.Deployment>edit in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>function - to modify the itempublic io.fabric8.kubernetes.api.model.extensions.Deployment accept(Consumer<io.fabric8.kubernetes.api.model.extensions.Deployment> consumer)
Editableaccept in interface Editable<io.fabric8.kubernetes.api.model.extensions.Deployment>accept in class HasMetadataOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>consumer - to modify the itempublic io.fabric8.kubernetes.api.model.extensions.Deployment replace(io.fabric8.kubernetes.api.model.extensions.Deployment 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<io.fabric8.kubernetes.api.model.extensions.Deployment>replace in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>item - with the replacement statepublic io.fabric8.kubernetes.api.model.extensions.Deployment patch(PatchContext patchContext, io.fabric8.kubernetes.api.model.extensions.Deployment 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. The resourceVersion and other fields of the item may be modified by this call.
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<io.fabric8.kubernetes.api.model.extensions.Deployment>patch in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>patchContext - PatchContext for patch requestitem - to be patched with patched valuespublic DeploymentOperationsImpl rolling()
rolling in interface Rollable<TimeoutImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>>public io.fabric8.kubernetes.api.model.Status rollback(io.fabric8.kubernetes.api.model.extensions.DeploymentRollback rollback)
rollback in interface Rollable<TimeoutImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>>public RollingUpdater<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList> getRollingUpdater(long rollingTimeout, TimeUnit rollingTimeUnit)
getRollingUpdater in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public io.fabric8.kubernetes.api.model.extensions.Deployment withReplicas(int count)
withReplicas in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public int getCurrentReplicas(io.fabric8.kubernetes.api.model.extensions.Deployment current)
getCurrentReplicas in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public int getDesiredReplicas(io.fabric8.kubernetes.api.model.extensions.Deployment item)
getDesiredReplicas in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public long getObservedGeneration(io.fabric8.kubernetes.api.model.extensions.Deployment current)
getObservedGeneration in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.extensions.Deployment,io.fabric8.kubernetes.api.model.extensions.DeploymentList,RollableScalableResource<io.fabric8.kubernetes.api.model.extensions.Deployment>>public io.fabric8.kubernetes.api.model.extensions.Deployment updateImage(String image)
ImageEditReplacePatchableupdateImage in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>image - image to be updatedpublic io.fabric8.kubernetes.api.model.extensions.Deployment updateImage(Map<String,String> containerToImageMap)
ImageEditReplacePatchableupdateImage in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>containerToImageMap - Map with keys as container name and value as imagepublic io.fabric8.kubernetes.api.model.extensions.Deployment resume()
ImageEditReplacePatchableresume in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>public io.fabric8.kubernetes.api.model.extensions.Deployment pause()
ImageEditReplacePatchablepause in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>public io.fabric8.kubernetes.api.model.extensions.Deployment restart()
ImageEditReplacePatchablerestart in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>public io.fabric8.kubernetes.api.model.extensions.Deployment undo()
ImageEditReplacePatchableundo in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>public ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment> withTimeoutInMillis(long timeoutInMillis)
withTimeoutInMillis in interface Timeoutable<ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>>public ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment> withTimeout(long timeout, TimeUnit unit)
withTimeout in interface Timeoutable<ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.extensions.Deployment>>public String getLog(Boolean isPretty)
Loggablepublic Reader getLogReader()
getLogReader in interface Loggable<LogWatch>public LogWatch watchLog()
Loggablepublic LogWatch watchLog(OutputStream out)
LoggablewatchLog in interface Loggable<LogWatch>out - OutputStream for storing logspublic Loggable<LogWatch> withLogWaitTimeout(Integer logWaitTimeout)
LoggablewithLogWaitTimeout in interface Loggable<LogWatch>logWaitTimeout - timeout in millisecondsLoggable for fetching logspublic Loggable<LogWatch> inContainer(String id)
ContainerableinContainer in interface Containerable<String,Loggable<LogWatch>>id - container for which we want logsCopyright © 2015–2020 Red Hat. All rights reserved.