Class DeploymentOperationsImpl

    • Constructor Detail

      • DeploymentOperationsImpl

        public DeploymentOperationsImpl​(okhttp3.OkHttpClient client,
                                        Config config)
      • DeploymentOperationsImpl

        public DeploymentOperationsImpl​(okhttp3.OkHttpClient client,
                                        Config config,
                                        String namespace)
    • Method Detail

      • scale

        public io.fabric8.kubernetes.api.model.apps.Deployment scale​(int count)
        Specified by:
        scale in interface Scaleable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Overrides:
        scale in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • scale

        public io.fabric8.kubernetes.api.model.apps.Deployment scale​(int count,
                                                                     boolean wait)
        Specified by:
        scale in interface Scaleable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Overrides:
        scale in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • edit

        public io.fabric8.kubernetes.api.model.apps.Deployment edit​(UnaryOperator<io.fabric8.kubernetes.api.model.apps.Deployment> function)
        Specified by:
        edit in interface Editable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Overrides:
        edit in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • accept

        public io.fabric8.kubernetes.api.model.apps.Deployment accept​(Consumer<io.fabric8.kubernetes.api.model.apps.Deployment> consumer)
        Specified by:
        accept in interface Editable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Overrides:
        accept in class HasMetadataOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • replace

        public io.fabric8.kubernetes.api.model.apps.Deployment replace​(io.fabric8.kubernetes.api.model.apps.Deployment item)
        Specified by:
        replace in interface Replaceable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Overrides:
        replace in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • patch

        public io.fabric8.kubernetes.api.model.apps.Deployment patch​(io.fabric8.kubernetes.api.model.apps.Deployment item)
        Specified by:
        patch in interface Patchable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Overrides:
        patch in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • rollback

        public io.fabric8.kubernetes.api.model.Status rollback​(io.fabric8.kubernetes.api.model.extensions.DeploymentRollback rollback)
        Specified by:
        rollback in interface Rollable<TimeoutImageEditReplacePatchable<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • withReplicas

        public io.fabric8.kubernetes.api.model.apps.Deployment withReplicas​(int count)
        Specified by:
        withReplicas in class RollableScalableResourceOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>
      • updateImage

        public io.fabric8.kubernetes.api.model.apps.Deployment updateImage​(String image)
        Description copied from interface: ImageEditReplacePatchable
        Update existing container image of single container resource
        Specified by:
        updateImage in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Parameters:
        image - image to be updated
        Returns:
        updated resource
      • updateImage

        public io.fabric8.kubernetes.api.model.apps.Deployment updateImage​(Map<String,​String> containerToImageMap)
        Description copied from interface: ImageEditReplacePatchable
        Update existing container image(s) of resources
        Specified by:
        updateImage in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Parameters:
        containerToImageMap - Map with keys as container name and value as image
        Returns:
        updated resource
      • resume

        public io.fabric8.kubernetes.api.model.apps.Deployment resume()
        Description copied from interface: ImageEditReplacePatchable
        Resume a paused resource. Paused resources will not be reconciled by a controller. By resuming a resource, we allow it to be reconciled again.
        Specified by:
        resume in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Returns:
        updated resource
      • pause

        public io.fabric8.kubernetes.api.model.apps.Deployment pause()
        Description copied from interface: ImageEditReplacePatchable
        Mark the provided resource as paused
        Specified by:
        pause in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Returns:
        updated resource
      • restart

        public io.fabric8.kubernetes.api.model.apps.Deployment restart()
        Description copied from interface: ImageEditReplacePatchable
        Restart a resource. Resource will be rollout restarted.
        Specified by:
        restart in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Returns:
        updated resource
      • undo

        public io.fabric8.kubernetes.api.model.apps.Deployment undo()
        Description copied from interface: ImageEditReplacePatchable
        Rollback to previous rollout.
        Specified by:
        undo in interface ImageEditReplacePatchable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Returns:
        updated resource
      • getLog

        public String getLog()
        Description copied from interface: Loggable
        Get logs of a resource
        Specified by:
        getLog in interface Loggable<LogWatch>
        Returns:
        logs as string
      • getLog

        public String getLog​(Boolean isPretty)
        Description copied from interface: Loggable
        Get logs with pretty enabled
        Specified by:
        getLog in interface Loggable<LogWatch>
        Parameters:
        isPretty - whether we need logs with pretty output or not
        Returns:
        logs as string
      • getLogReader

        public Reader getLogReader()
        Returns an unclosed Reader. It's the caller responsibility to close it.
        Specified by:
        getLogReader in interface Loggable<LogWatch>
        Returns:
        Reader
      • watchLog

        public LogWatch watchLog()
        Description copied from interface: Loggable
        Watch logs of a resource
        Specified by:
        watchLog in interface Loggable<LogWatch>
        Returns:
        returns a Closeable interface for log watch
      • watchLog

        public LogWatch watchLog​(OutputStream out)
        Description copied from interface: Loggable
        Watch logs of resource and put them inside OutputStream inside
        Specified by:
        watchLog in interface Loggable<LogWatch>
        Parameters:
        out - OutputStream for storing logs
        Returns:
        returns a Closeable interface for log watch
      • withLogWaitTimeout

        public Loggable<LogWatch> withLogWaitTimeout​(Integer logWaitTimeout)
        Description copied from interface: Loggable
        While waiting for Pod logs, how long shall we wait until a Pod becomes ready and starts producing logs
        Specified by:
        withLogWaitTimeout in interface Loggable<LogWatch>
        Parameters:
        logWaitTimeout - timeout in milliseconds
        Returns:
        Loggable for fetching logs
      • edit

        public io.fabric8.kubernetes.api.model.apps.Deployment edit​(io.fabric8.kubernetes.api.builder.Visitor... visitors)
        Specified by:
        edit in interface Editable<io.fabric8.kubernetes.api.model.apps.Deployment>
        Overrides:
        edit in class BaseOperation<io.fabric8.kubernetes.api.model.apps.Deployment,​io.fabric8.kubernetes.api.model.apps.DeploymentList,​RollableScalableResource<io.fabric8.kubernetes.api.model.apps.Deployment>>