Class PodOperationsImpl
- java.lang.Object
-
- io.fabric8.kubernetes.client.dsl.base.OperationSupport
-
- io.fabric8.kubernetes.client.dsl.base.BaseOperation<T,L,R>
-
- io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>>
-
- io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl
-
- All Implemented Interfaces:
AnyNamespaceable<FilterWatchListMultiDeletable<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList>>,BytesLimitable<TimeTailPrettyLoggable<LogWatch>>,BytesLimitTerminateTimeTailPrettyLoggable<LogWatch>,Cascading<EditReplacePatchDeletable<io.fabric8.kubernetes.api.model.Pod>>,CascadingEditReplacePatchDeletable<io.fabric8.kubernetes.api.model.Pod>,Containerable<String,ContainerResource<LogWatch,InputStream,PipedOutputStream,OutputStream,PipedInputStream,String,ExecWatch,Boolean,InputStream,Boolean>>,ContainerResource<LogWatch,InputStream,PipedOutputStream,OutputStream,PipedInputStream,String,ExecWatch,Boolean,InputStream,Boolean>,Copiable<Boolean>,CopyOrReadable<Boolean,InputStream,Boolean>,Createable<io.fabric8.kubernetes.api.model.Pod>,CreateFromServerGettable<io.fabric8.kubernetes.api.model.Pod>,CreateOrReplaceable<io.fabric8.kubernetes.api.model.Pod>,Deletable,DryRunable<WritableOperation<io.fabric8.kubernetes.api.model.Pod>>,Editable<io.fabric8.kubernetes.api.model.Pod>,EditReplacePatchable<io.fabric8.kubernetes.api.model.Pod>,EditReplacePatchDeletable<io.fabric8.kubernetes.api.model.Pod>,Errorable<OutputStream,PipedInputStream,TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch>>,ErrorChannelable<OutputStream,PipedInputStream,TtyExecable<String,ExecWatch>>,Evictable<Boolean>,Execable<String,ExecWatch>,ExecListenable<String,ExecWatch>,FileSelector<CopyOrReadable<Boolean,InputStream,Boolean>>,Filterable<FilterWatchListDeletable<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList>>,FilterWatchListDeletable<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList>,FilterWatchListMultiDeletable<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList>,FromServerable<Gettable<io.fabric8.kubernetes.api.model.Pod>>,Gettable<io.fabric8.kubernetes.api.model.Pod>,Inputable<InputStream,PipedOutputStream,TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch>>,Listable<io.fabric8.kubernetes.api.model.PodList>,Listenable<Execable<String,ExecWatch>,ExecListener>,Loadable<PodResource<io.fabric8.kubernetes.api.model.Pod>>,Lockable<Replaceable<io.fabric8.kubernetes.api.model.Pod>>,Loggable<LogWatch>,MixedOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>>,MultiDeleteable<io.fabric8.kubernetes.api.model.Pod>,Nameable<PodResource<io.fabric8.kubernetes.api.model.Pod>>,Namespaceable<NonNamespaceOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>>>,NonNamespaceOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>>,Operation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>>,Outputable<OutputStream,PipedInputStream,TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch>>,Patchable<io.fabric8.kubernetes.api.model.Pod>,PodResource<io.fabric8.kubernetes.api.model.Pod>,PortForwardable<PortForward,LocalPortForward,ReadableByteChannel,WritableByteChannel>,Prettyable<Loggable<LogWatch>>,PrettyLoggable<LogWatch>,Readable<InputStream>,Readiable,Replaceable<io.fabric8.kubernetes.api.model.Pod>,Requirable<io.fabric8.kubernetes.api.model.Pod>,Resource<io.fabric8.kubernetes.api.model.Pod>,StatusUpdatable<io.fabric8.kubernetes.api.model.Pod>,Tailable<PrettyLoggable<LogWatch>>,TailPrettyLoggable<LogWatch>,Terminateable<TimeTailPrettyLoggable<LogWatch>>,TerminateTimeTailPrettyLoggable<LogWatch>,Timeable<TailPrettyLoggable<LogWatch>>,Timestampable<BytesLimitTerminateTimeTailPrettyLoggable<LogWatch>>,TimestampBytesLimitTerminateTimeTailPrettyLoggable<LogWatch>,TimeTailPrettyLoggable<LogWatch>,Ttyable<ExecListenable<String,ExecWatch>>,TtyExecable<String,ExecWatch>,TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch>,TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch>,TtyExecInputOutputErrorable<String,OutputStream,PipedInputStream,InputStream,PipedOutputStream,ExecWatch>,TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch>,Uploadable<Boolean>,Versionable<WatchAndWaitable<io.fabric8.kubernetes.api.model.Pod>>,VersionWatchAndWaitable<io.fabric8.kubernetes.api.model.Pod>,Waitable<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.Pod>,Watchable<Watcher<io.fabric8.kubernetes.api.model.Pod>>,WatchAndWaitable<io.fabric8.kubernetes.api.model.Pod>,WatchListDeletable<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList>,WritableOperation<io.fabric8.kubernetes.api.model.Pod>,FromServerGettable<io.fabric8.kubernetes.api.model.Pod>,GracePeriodConfigurable<Deletable>,OperationInfo,PropagationPolicyConfigurable<EditReplacePatchDeletable<io.fabric8.kubernetes.api.model.Pod>>
public class PodOperationsImpl extends HasMetadataOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>> implements PodResource<io.fabric8.kubernetes.api.model.Pod>, CopyOrReadable<Boolean,InputStream,Boolean>
-
-
Field Summary
Fields Modifier and Type Field Description static intHTTP_TOO_MANY_REQUESTS-
Fields inherited from class io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation
DEFAULT_GRACE_PERIOD_IN_SECONDS, DEFAULT_PROPAGATION_POLICY
-
Fields inherited from class io.fabric8.kubernetes.client.dsl.base.BaseOperation
apiVersion, listType, type
-
Fields inherited from class io.fabric8.kubernetes.client.dsl.base.OperationSupport
apiGroupName, apiGroupVersion, client, config, context, dryRun, JSON, JSON_MAPPER, JSON_PATCH, name, namespace, resourceT, STRATEGIC_MERGE_JSON_PATCH, YAML_MAPPER
-
Fields inherited from interface io.fabric8.kubernetes.client.dsl.Waitable
DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_INITIAL_BACKOFF_MILLIS
-
-
Constructor Summary
Constructors Constructor Description PodOperationsImpl(PodOperationContext context)PodOperationsImpl(okhttp3.OkHttpClient client, Config config)PodOperationsImpl(okhttp3.OkHttpClient client, Config config, String namespace)
-
Method Summary
-
Methods inherited from class io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation
accept, edit, patch, replace
-
Methods inherited from class io.fabric8.kubernetes.client.dsl.base.BaseOperation
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, handleReplace, handleResponse, handleScale, inAnyNamespace, inNamespace, isApiGroup, 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, withInvolvedObject, withItem, withLabel, withLabel, withLabelIn, withLabelNotIn, withLabels, withLabelSelector, withName, withoutField, withoutFields, withoutLabel, withoutLabel, withoutLabels, withPropagationPolicy, withResourceVersion, withWaitRetryBackoff
-
Methods inherited from class io.fabric8.kubernetes.client.dsl.base.OperationSupport
assertResponseCode, checkName, checkNamespace, createStatus, createStatus, getAPIGroup, getAPIVersion, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getObjectValueAsMap, getResourceUrl, getResourceUrl, getResourceURLForWriteOperation, getRootUrl, handleCreate, handleDelete, handleDelete, handleDeploymentRollback, handleGet, handleGet, handleMetric, handlePatch, handlePatch, handleReplace, handleReplace, handleResponse, handleResponse, handleResponse, handleResponse, handleScale, handleStatusUpdate, requestException, requestFailure, unmarshal, unmarshal, unmarshal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Createable
create, create
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.CreateOrReplaceable
createOrReplace
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.DryRunable
dryRun, dryRun
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.FromServerable
fromServer
-
Methods inherited from interface io.fabric8.kubernetes.client.GracePeriodConfigurable
withGracePeriod
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Lockable
lockResourceVersion
-
Methods inherited from interface io.fabric8.kubernetes.client.OperationInfo
getName, getNamespace
-
Methods inherited from interface io.fabric8.kubernetes.client.PropagationPolicyConfigurable
withPropagationPolicy
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Replaceable
replace
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Requirable
require
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.StatusUpdatable
updateStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Versionable
withResourceVersion
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Waitable
waitUntilCondition, waitUntilReady, withWaitRetryBackoff
-
-
-
-
Field Detail
-
HTTP_TOO_MANY_REQUESTS
public static final int HTTP_TOO_MANY_REQUESTS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PodOperationsImpl
public PodOperationsImpl(okhttp3.OkHttpClient client, Config config)
-
PodOperationsImpl
public PodOperationsImpl(okhttp3.OkHttpClient client, Config config, String namespace)
-
PodOperationsImpl
public PodOperationsImpl(PodOperationContext context)
-
-
Method Detail
-
newInstance
public PodOperationsImpl newInstance(OperationContext context)
- Overrides:
newInstancein classBaseOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>>
-
getContext
public PodOperationContext getContext()
-
getLogParameters
protected String getLogParameters()
-
doGetLog
protected okhttp3.ResponseBody doGetLog()
-
getLogReader
public Reader getLogReader()
Returns an unclosed Reader. It's the caller responsibility to close it.- Specified by:
getLogReaderin interfaceLoggable<LogWatch>- Returns:
- Reader
-
getLog
public String getLog(Boolean isPretty)
Description copied from interface:LoggableGet logs with pretty enabled
-
watchLog
public LogWatch watchLog()
Description copied from interface:LoggableWatch logs of a resource
-
watchLog
public LogWatch watchLog(OutputStream out)
Description copied from interface:LoggableWatch logs of resource and put them inside OutputStream inside- Specified by:
watchLogin interfaceLoggable<LogWatch>- Parameters:
out-OutputStreamfor storing logs- Returns:
- returns a Closeable interface for log watch
-
withLogWaitTimeout
public Loggable<LogWatch> withLogWaitTimeout(Integer logWaitTimeout)
Description copied from interface:LoggableWhile waiting for Pod logs, how long shall we wait until a Pod becomes ready and starts producing logs- Specified by:
withLogWaitTimeoutin interfaceLoggable<LogWatch>- Parameters:
logWaitTimeout- timeout in milliseconds- Returns:
Loggablefor fetching logs
-
portForward
public PortForward portForward(int port, ReadableByteChannel in, WritableByteChannel out)
Description copied from interface:PortForwardableConnects directly the remote port to the given input and output channels.- Specified by:
portForwardin interfacePortForwardable<PortForward,LocalPortForward,ReadableByteChannel,WritableByteChannel>- Parameters:
port- port as integerin- input channelout- output channel- Returns:
- returns port forward interface
-
portForward
public LocalPortForward portForward(int port)
Description copied from interface:PortForwardableCreate a server socket on a random local port. Every connection to the local port will be forwarded to the remote port on the resource. The random local port can be retrieved from the returned object.- Specified by:
portForwardin interfacePortForwardable<PortForward,LocalPortForward,ReadableByteChannel,WritableByteChannel>- Parameters:
port- port as integer- Returns:
- returns local port
-
portForward
public LocalPortForward portForward(int port, int localPort)
Description copied from interface:PortForwardableCreate a server socket on a specified local port. Every connection to the local port will be forwarded to the remote port on the resource.- Specified by:
portForwardin interfacePortForwardable<PortForward,LocalPortForward,ReadableByteChannel,WritableByteChannel>- Parameters:
port- port in integerlocalPort- local port in integer- Returns:
- returns local port forward interface
-
evict
public Boolean evict()
Description copied from interface:EvictableEvicts resource, respectingPodDisruptionBudget
-
inContainer
public ContainerResource<LogWatch,InputStream,PipedOutputStream,OutputStream,PipedInputStream,String,ExecWatch,Boolean,InputStream,Boolean> inContainer(String containerId)
Description copied from interface:ContainerableGet logs of a specific container- Specified by:
inContainerin interfaceContainerable<String,ContainerResource<LogWatch,InputStream,PipedOutputStream,OutputStream,PipedInputStream,String,ExecWatch,Boolean,InputStream,Boolean>>- Parameters:
containerId- container for which we want logs- Returns:
- returns pod log operation with specified PodLogOption configured
-
file
public CopyOrReadable<Boolean,InputStream,Boolean> file(String file)
- Specified by:
filein interfaceFileSelector<CopyOrReadable<Boolean,InputStream,Boolean>>
-
dir
public CopyOrReadable<Boolean,InputStream,Boolean> dir(String dir)
- Specified by:
dirin interfaceFileSelector<CopyOrReadable<Boolean,InputStream,Boolean>>
-
upload
public Boolean upload(Path path)
- Specified by:
uploadin interfaceUploadable<Boolean>
-
read
public InputStream read()
- Specified by:
readin interfaceReadable<InputStream>
-
readTar
public InputStream readTar(String source) throws Exception
- Throws:
Exception
-
readingInput
public TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch> readingInput(InputStream in)
- Specified by:
readingInputin interfaceInputable<InputStream,PipedOutputStream,TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch>>
-
writingInput
public TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch> writingInput(PipedOutputStream inPipe)
- Specified by:
writingInputin interfaceInputable<InputStream,PipedOutputStream,TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch>>
-
redirectingInput
public TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch> redirectingInput()
- Specified by:
redirectingInputin interfaceInputable<InputStream,PipedOutputStream,TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch>>
-
redirectingInput
public TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch> redirectingInput(Integer bufferSize)
- Specified by:
redirectingInputin interfaceInputable<InputStream,PipedOutputStream,TtyExecOutputErrorable<String,OutputStream,PipedInputStream,ExecWatch>>
-
writingOutput
public TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch> writingOutput(OutputStream out)
- Specified by:
writingOutputin interfaceOutputable<OutputStream,PipedInputStream,TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch>>
-
readingOutput
public TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch> readingOutput(PipedInputStream outPipe)
- Specified by:
readingOutputin interfaceOutputable<OutputStream,PipedInputStream,TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch>>
-
redirectingOutput
public TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch> redirectingOutput()
- Specified by:
redirectingOutputin interfaceOutputable<OutputStream,PipedInputStream,TtyExecErrorable<String,OutputStream,PipedInputStream,ExecWatch>>
-
writingError
public TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch> writingError(OutputStream err)
- Specified by:
writingErrorin interfaceErrorable<OutputStream,PipedInputStream,TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch>>
-
readingError
public TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch> readingError(PipedInputStream errPipe)
- Specified by:
readingErrorin interfaceErrorable<OutputStream,PipedInputStream,TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch>>
-
redirectingError
public TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch> redirectingError()
- Specified by:
redirectingErrorin interfaceErrorable<OutputStream,PipedInputStream,TtyExecErrorChannelable<String,OutputStream,PipedInputStream,ExecWatch>>
-
writingErrorChannel
public TtyExecable<String,ExecWatch> writingErrorChannel(OutputStream errChannel)
- Specified by:
writingErrorChannelin interfaceErrorChannelable<OutputStream,PipedInputStream,TtyExecable<String,ExecWatch>>
-
readingErrorChannel
public TtyExecable<String,ExecWatch> readingErrorChannel(PipedInputStream errChannelPipe)
- Specified by:
readingErrorChannelin interfaceErrorChannelable<OutputStream,PipedInputStream,TtyExecable<String,ExecWatch>>
-
redirectingErrorChannel
public TtyExecable<String,ExecWatch> redirectingErrorChannel()
- Specified by:
redirectingErrorChannelin interfaceErrorChannelable<OutputStream,PipedInputStream,TtyExecable<String,ExecWatch>>
-
withTTY
public ExecListenable<String,ExecWatch> withTTY()
- Specified by:
withTTYin interfaceTtyable<ExecListenable<String,ExecWatch>>
-
withPrettyOutput
public Loggable<LogWatch> withPrettyOutput()
Description copied from interface:PrettyableGet logs with pretty output- Specified by:
withPrettyOutputin interfacePrettyable<Loggable<LogWatch>>- Returns:
- returns pod log operation with specified PodLogOption configured
-
tailingLines
public PrettyLoggable<LogWatch> tailingLines(int withTailingLines)
Description copied from interface:TailableGet logs lines of recent log file to display.- Specified by:
tailingLinesin interfaceTailable<PrettyLoggable<LogWatch>>- Parameters:
withTailingLines- number of lines to tail- Returns:
- returns pod log operation with specified PodLogOption configured
-
sinceTime
public TailPrettyLoggable<LogWatch> sinceTime(String sinceTimestamp)
Description copied from interface:TimeableOnly return logs after a specific date (RFC3339)- Specified by:
sinceTimein interfaceTimeable<TailPrettyLoggable<LogWatch>>- Parameters:
sinceTimestamp- timestamp as string- Returns:
- log operation with PodLogOptions configured
-
sinceSeconds
public TailPrettyLoggable<LogWatch> sinceSeconds(int sinceSeconds)
Description copied from interface:TimeableGet logs after a duration of seconds:- Specified by:
sinceSecondsin interfaceTimeable<TailPrettyLoggable<LogWatch>>- Parameters:
sinceSeconds- number of seconds- Returns:
- log operation with PodLogOptions configured
-
terminated
public TimeTailPrettyLoggable<LogWatch> terminated()
Description copied from interface:TerminateableGet logs for the previous instance of the container in a pod if it exists:- Specified by:
terminatedin interfaceTerminateable<TimeTailPrettyLoggable<LogWatch>>- Returns:
- returns pod log operation with specified PodLogOption configured
-
usingListener
public Execable<String,ExecWatch> usingListener(ExecListener execListener)
- Specified by:
usingListenerin interfaceListenable<Execable<String,ExecWatch>,ExecListener>
-
limitBytes
public BytesLimitTerminateTimeTailPrettyLoggable<LogWatch> limitBytes(int limitBytes)
Description copied from interface:BytesLimitableConfigure Maximum bytes of logs to return. Defaults to no limit.- Specified by:
limitBytesin interfaceBytesLimitable<TimeTailPrettyLoggable<LogWatch>>- Parameters:
limitBytes- number of bytes- Returns:
- returns pod log operation with specified PodLogOption configured
-
usingTimestamps
public BytesLimitTerminateTimeTailPrettyLoggable<LogWatch> usingTimestamps()
Description copied from interface:TimestampableInclude timestamps on each line in the log output- Specified by:
usingTimestampsin interfaceTimestampable<BytesLimitTerminateTimeTailPrettyLoggable<LogWatch>>- Returns:
- returns pod log operation with specified PodLogOption configured
-
edit
public io.fabric8.kubernetes.api.model.Pod edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
- Specified by:
editin interfaceEditable<io.fabric8.kubernetes.api.model.Pod>- Overrides:
editin classBaseOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource<io.fabric8.kubernetes.api.model.Pod>>
-
-