scale

package
v1.14.1-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdScale

func NewCmdScale(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale

func ScaleJob

func ScaleJob(info *resource.Info, jobsClient batchclient.JobsGetter, count uint, preconditions *kubectl.ScalePrecondition, retry, waitForReplicas *kubectl.RetryParams) error

Types

type JobPsuedoScaler

type JobPsuedoScaler struct {
	JobsClient batchclient.JobsGetter
}

JobPsuedoScaler is a deprecated scale-similar thing that doesn't obey scale semantics

func (*JobPsuedoScaler) Scale

func (scaler *JobPsuedoScaler) Scale(namespace, name string, newSize uint, preconditions *ScalePrecondition, retry, waitForReplicas *RetryParams) error

Scale updates a Job to a new size, with optional precondition check (if preconditions is not nil), optional retries (if retry is not nil), and then optionally waits for parallelism to reach desired number, which can be less than requested based on job's current progress.

func (*JobPsuedoScaler) ScaleSimple

func (scaler *JobPsuedoScaler) ScaleSimple(namespace, name string, preconditions *ScalePrecondition, newSize uint) (string, error)

ScaleSimple is responsible for updating job's parallelism. It returns the resourceVersion of the job if the update is successful.

type PreconditionError

type PreconditionError struct {
	Precondition  string
	ExpectedValue string
	ActualValue   string
}

PreconditionError is a deprecated error

func (PreconditionError) Error

func (pe PreconditionError) Error() string

type RetryParams

type RetryParams struct {
	Interval, Timeout time.Duration
}

RetryParams is a deprecated retry struct

type ScaleOptions

type ScaleOptions struct {
	FilenameOptions resource.FilenameOptions
	RecordFlags     *genericclioptions.RecordFlags
	PrintFlags      *genericclioptions.PrintFlags
	PrintObj        printers.ResourcePrinterFunc

	Selector        string
	All             bool
	Replicas        int
	ResourceVersion string
	CurrentReplicas int
	Timeout         time.Duration

	Recorder genericclioptions.Recorder

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewScaleOptions

func NewScaleOptions(ioStreams genericclioptions.IOStreams) *ScaleOptions

func (*ScaleOptions) Complete

func (o *ScaleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

func (*ScaleOptions) RunScale

func (o *ScaleOptions) RunScale() error

RunScale executes the scaling

func (*ScaleOptions) Validate

func (o *ScaleOptions) Validate(cmd *cobra.Command) error

type ScalePrecondition

type ScalePrecondition struct {
	Size            int
	ResourceVersion string
}

ScalePrecondition is a deprecated precondition

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL