Documentation ¶
Index ¶
- func CreateConfigMap(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
- func CreateNamespace(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
- func CreateSecretDockerRegistry(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
- func CreateSecretGeneric(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
- func CreateServiceAccount(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
- func DeleteResult(r *resource.Result, out io.Writer, ignoreNotFound bool, shortOutput bool, ...) error
- func DescribeMatchingResources(mapper meta.RESTMapper, typer runtime.ObjectTyper, f *cmdutil.Factory, ...) error
- func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error)
- func NewCmdAnnotate(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdApiVersions(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdApply(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdAttach(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command
- func NewCmdAutoscale(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdClusterInfo(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdConvert(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdCordon(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdCreateConfigMap(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateNamespace(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateSecret(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateSecretDockerRegistry(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateSecretGeneric(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateServiceAccount(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdDrain(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdEdit(f *cmdutil.Factory, out, errOut io.Writer) *cobra.Command
- func NewCmdExec(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command
- func NewCmdExplain(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdGet(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdLogs(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdNamespace(out io.Writer) *cobra.Command
- func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdPortForward(f *cmdutil.Factory) *cobra.Command
- func NewCmdProxy(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdReplace(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdRollingUpdate(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdRun(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command
- func NewCmdRunWithOptions(f *cmdutil.Factory, opts *RunOptions, cmdIn io.Reader, ...) *cobra.Command
- func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdUncordon(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdVersion(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewKubectlCommand(f *cmdutil.Factory, in io.Reader, out, err io.Writer) *cobra.Command
- func ReapResult(r *resource.Result, f *cmdutil.Factory, out io.Writer, ...) error
- func Run(f *cmdutil.Factory, opts *RunOptions, cmdIn io.Reader, ...) error
- func RunApiVersions(f *cmdutil.Factory, w io.Writer) error
- func RunApply(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *ApplyOptions) error
- func RunAutoscale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunClusterInfo(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
- func RunCreate(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *CreateOptions) error
- func RunCreateSubcommand(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, ...) error
- func RunDelete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunDescribe(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunEdit(f *cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunExplain(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) error
- func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunLabel(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunPortForward(f *cmdutil.Factory, cmd *cobra.Command, args []string, fw portForwarder) error
- func RunProxy(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
- func RunReplace(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunRollingUpdate(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunStop(f *cmdutil.Factory, cmd *cobra.Command, args []string, out io.Writer, ...) error
- func RunVersion(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
- func ValidateArgs(cmd *cobra.Command, args []string) error
- type AnnotateOptions
- type ApplyOptions
- type AttachOptions
- type ConvertOptions
- type CreateOptions
- type CreateSubcommandOptions
- type DefaultRemoteAttach
- type DefaultRemoteExecutor
- type DeleteOptions
- type DescribeOptions
- type DrainOptions
- type ExecOptions
- type ExposeOptions
- type GetOptions
- type LabelOptions
- type LogsOptions
- type PatchOptions
- type RemoteAttach
- type RemoteExecutor
- type ReplaceOptions
- type RollingUpdateOptions
- type RunOptions
- type ScaleOptions
- type StopOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfigMap ¶ added in v1.1.5
CreateConfigMap is the implementation of the create configmap generic command.
func CreateNamespace ¶ added in v1.1.3
CreateNamespace implements the behavior to run the create namespace command
func CreateSecretDockerRegistry ¶ added in v1.1.3
func CreateSecretDockerRegistry(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
CreateSecretDockerRegistry is the implementation of the create secret docker-registry command
func CreateSecretGeneric ¶ added in v1.1.3
func CreateSecretGeneric(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
CreateSecretGeneric is the implementation of the create secret generic command
func CreateServiceAccount ¶ added in v1.1.4
func CreateServiceAccount(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
CreateServiceAccount implements the behavior to run the create service account command
func DeleteResult ¶
func NameFromCommandArgs ¶ added in v1.1.3
NameFromCommandArgs is a utility function for commands that assume the first argument is a resource name
func NewCmdApply ¶ added in v1.0.7
func NewCmdAttach ¶
func NewCmdAutoscale ¶ added in v1.1.2
func NewCmdConvert ¶ added in v1.0.7
NewCmdConvert creates a command object for the generic "convert" action, which translates the config file into a given version.
func NewCmdCordon ¶ added in v1.1.3
func NewCmdCreateConfigMap ¶ added in v1.1.5
ConfigMap is a command to ease creating ConfigMaps.
func NewCmdCreateNamespace ¶ added in v1.1.3
NewCmdCreateNamespace is a macro command to create a new namespace
func NewCmdCreateSecret ¶ added in v1.1.3
NewCmdCreateSecret groups subcommands to create various types of secrets
func NewCmdCreateSecretDockerRegistry ¶ added in v1.1.3
NewCmdCreateSecretDockerRegistry is a macro command for creating secrets to work with Docker registries
func NewCmdCreateSecretGeneric ¶ added in v1.1.3
NewCmdCreateSecretGeneric is a command to create generic secrets from files, directories, or literal values
func NewCmdCreateServiceAccount ¶ added in v1.1.4
NewCmdCreateServiceAccount is a macro command to create a new service account
func NewCmdDrain ¶ added in v1.1.3
func NewCmdEdit ¶ added in v1.0.7
func NewCmdExec ¶
func NewCmdExplain ¶ added in v1.0.7
NewCmdExplain returns a cobra command for swagger docs
func NewCmdExposeService ¶
func NewCmdGet ¶
NewCmdGet creates a command object for the generic "get" action, which retrieves one or more resources from a server.
func NewCmdLogs ¶ added in v1.1.2
NewCmdLog creates a new pod logs command
func NewCmdNamespace ¶
TODO remove once people have been given enough time to notice
func NewCmdRollingUpdate ¶
func NewCmdRunWithOptions ¶ added in v1.1.5
func NewCmdScale ¶
NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
func NewCmdUncordon ¶ added in v1.1.3
func NewKubectlCommand ¶
NewKubectlCommand creates the `kubectl` command and its nested children.
func ReapResult ¶
func RunAutoscale ¶ added in v1.1.2
func RunClusterInfo ¶
func RunCreateSubcommand ¶ added in v1.1.3
func RunCreateSubcommand(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *CreateSubcommandOptions) error
RunCreateSubcommand executes a create subcommand using the specified options
func RunDescribe ¶
func RunExplain ¶ added in v1.0.7
RunExplain executes the appropriate steps to print a model's documentation
func RunGet ¶
func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *GetOptions) error
RunGet implements the generic Get command TODO: convert all direct flag accessors to a struct and pass that instead of cmd
func RunPortForward ¶
func RunReplace ¶
func RunRollingUpdate ¶
func RunScale ¶
func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, shortOutput bool, options *ScaleOptions) error
RunScale executes the scaling
Types ¶
type AnnotateOptions ¶
type AnnotateOptions struct {
// contains filtered or unexported fields
}
AnnotateOptions have the data required to perform the annotate operation
func (*AnnotateOptions) Complete ¶
func (o *AnnotateOptions) Complete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) (err error)
Complete adapts from the command line args and factory to the data required.
func (AnnotateOptions) RunAnnotate ¶
func (o AnnotateOptions) RunAnnotate() error
RunAnnotate does the work
func (AnnotateOptions) Validate ¶
func (o AnnotateOptions) Validate(args []string) error
Validate checks to the AnnotateOptions to see if there is sufficient information run the command.
type ApplyOptions ¶ added in v1.0.7
type ApplyOptions struct {
Filenames []string
}
ApplyOptions stores cmd.Flag values for apply. As new fields are added, add them here instead of referencing the cmd.Flags()
type AttachOptions ¶
type AttachOptions struct { Namespace string PodName string ContainerName string Stdin bool TTY bool CommandName string // InterruptParent, if set, is used to handle interrupts while attached InterruptParent *interrupt.Handler In io.Reader Out io.Writer Err io.Writer Pod *api.Pod Attach RemoteAttach Client *client.Client Config *restclient.Config }
AttachOptions declare the arguments accepted by the Exec command
func (*AttachOptions) Complete ¶
Complete verifies command line arguments and loads data from the command environment
func (*AttachOptions) GetContainer ¶ added in v1.0.8
func (p *AttachOptions) GetContainer(pod *api.Pod) api.Container
GetContainer returns the container to attach to, with a fallback.
func (*AttachOptions) GetContainerName ¶ added in v1.0.7
func (p *AttachOptions) GetContainerName(pod *api.Pod) string
GetContainerName returns the name of the container to attach to, with a fallback.
func (*AttachOptions) Run ¶
func (p *AttachOptions) Run() error
Run executes a validated remote execution against a pod.
func (*AttachOptions) Validate ¶
func (p *AttachOptions) Validate() error
Validate checks that the provided attach options are specified.
type ConvertOptions ¶ added in v1.0.7
type ConvertOptions struct {
// contains filtered or unexported fields
}
ConvertOptions have the data required to perform the convert operation
func (*ConvertOptions) Complete ¶ added in v1.0.7
func (o *ConvertOptions) Complete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string) (err error)
Complete collects information required to run Convert command from command line.
func (*ConvertOptions) RunConvert ¶ added in v1.0.7
func (o *ConvertOptions) RunConvert() error
RunConvert implements the generic Convert command
type CreateOptions ¶ added in v1.0.7
type CreateOptions struct {
Filenames []string
}
CreateOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type CreateSubcommandOptions ¶ added in v1.1.3
type CreateSubcommandOptions struct { // Name of resource being created Name string // StructuredGenerator is the resource generator for the object being created StructuredGenerator kubectl.StructuredGenerator // DryRun is true if the command should be simulated but not run against the server DryRun bool // OutputFormat OutputFormat string }
CreateSubcommandOptions is an options struct to support create subcommands
type DefaultRemoteAttach ¶
type DefaultRemoteAttach struct{}
DefaultRemoteAttach is the standard implementation of attaching
type DefaultRemoteExecutor ¶
type DefaultRemoteExecutor struct{}
DefaultRemoteExecutor is the standard implementation of remote command execution
type DeleteOptions ¶ added in v1.0.7
type DeleteOptions struct {
Filenames []string
}
DeleteOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type DescribeOptions ¶ added in v1.0.7
type DescribeOptions struct {
Filenames []string
}
DescribeOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type DrainOptions ¶ added in v1.1.3
type DrainOptions struct { Force bool GracePeriodSeconds int IgnoreDaemonsets bool // contains filtered or unexported fields }
func (*DrainOptions) RunCordonOrUncordon ¶ added in v1.1.3
func (o *DrainOptions) RunCordonOrUncordon(desired bool) error
RunCordonOrUncordon runs either Cordon or Uncordon. The desired value for "Unschedulable" is passed as the first arg.
func (*DrainOptions) RunDrain ¶ added in v1.1.3
func (o *DrainOptions) RunDrain() error
RunDrain runs the 'drain' command
func (*DrainOptions) SetupDrain ¶ added in v1.1.3
func (o *DrainOptions) SetupDrain(cmd *cobra.Command, args []string) error
SetupDrain populates some fields from the factory, grabs command line arguments and looks up the node using Builder
type ExecOptions ¶
type ExecOptions struct { Namespace string PodName string ContainerName string Stdin bool TTY bool Command []string In io.Reader Out io.Writer Err io.Writer Executor RemoteExecutor Client *client.Client Config *restclient.Config }
ExecOptions declare the arguments accepted by the Exec command
func (*ExecOptions) Complete ¶
func (p *ExecOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, argsIn []string, argsLenAtDash int) error
Complete verifies command line arguments and loads data from the command environment
func (*ExecOptions) Run ¶
func (p *ExecOptions) Run() error
Run executes a validated remote execution against a pod.
func (*ExecOptions) Validate ¶
func (p *ExecOptions) Validate() error
Validate checks that the provided exec options are specified.
type ExposeOptions ¶ added in v1.0.7
type ExposeOptions struct {
Filenames []string
}
ExposeOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type GetOptions ¶ added in v1.0.7
type GetOptions struct {
Filenames []string
}
GetOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type LabelOptions ¶ added in v1.0.7
type LabelOptions struct {
Filenames []string
}
LabelOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type LogsOptions ¶ added in v1.0.7
type LogsOptions struct { Namespace string ResourceArg string Options runtime.Object Mapper meta.RESTMapper Typer runtime.ObjectTyper ClientMapper resource.ClientMapper Decoder runtime.Decoder Object runtime.Object LogsForObject func(object, options runtime.Object) (*restclient.Request, error) Out io.Writer }
func (LogsOptions) RunLogs ¶ added in v1.1.2
func (o LogsOptions) RunLogs() (int64, error)
RunLogs retrieves a pod log
func (LogsOptions) Validate ¶ added in v1.0.7
func (o LogsOptions) Validate() error
type PatchOptions ¶ added in v1.0.7
type PatchOptions struct {
Filenames []string
}
PatchOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type RemoteAttach ¶
type RemoteAttach interface {
Attach(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
}
RemoteAttach defines the interface accepted by the Attach command - provided for test stubbing
type RemoteExecutor ¶
type RemoteExecutor interface {
Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
}
RemoteExecutor defines the interface accepted by the Exec command - provided for test stubbing
type ReplaceOptions ¶ added in v1.0.7
type ReplaceOptions struct {
Filenames []string
}
ReplaceOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type RollingUpdateOptions ¶ added in v1.0.7
type RollingUpdateOptions struct {
Filenames []string
}
RollingUpdateOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type RunOptions ¶ added in v1.1.5
type ScaleOptions ¶ added in v1.0.7
type ScaleOptions struct {
Filenames []string
}
ScaleOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type StopOptions ¶ added in v1.0.7
type StopOptions struct {
Filenames []string
}
StopOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
Source Files ¶
- annotate.go
- apiversions.go
- apply.go
- attach.go
- autoscale.go
- clusterinfo.go
- cmd.go
- convert.go
- create.go
- create_configmap.go
- create_namespace.go
- create_secret.go
- create_serviceaccount.go
- delete.go
- describe.go
- drain.go
- edit.go
- exec.go
- explain.go
- expose.go
- get.go
- label.go
- logs.go
- namespace.go
- patch.go
- portforward.go
- proxy.go
- replace.go
- rollingupdate.go
- run.go
- scale.go
- stop.go
- version.go