Documentation ¶
Index ¶
- Constants
- func CreateDeploy(comm *koliutil.CommandParams, args []string) error
- func CreateNamespace(f *koliutil.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 NewCmdAttach(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdCreate(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdCreateAddOn(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdCreateDeploy(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdCreateLinks(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdCreateNamespace(f *koliutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdDelete(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdDescribe(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdExec(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdGet(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdLabel(f *koliutil.Factory, out io.Writer) *cobra.Command
- func NewCmdLogin(comm *koliutil.CommandParams, pathOptions *clientcmd.PathOptions) *cobra.Command
- func NewCmdLogs(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdPortForward(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdScale(comm *koliutil.CommandParams) *cobra.Command
- func NewCmdVersion(f cmdutil.Factory, out io.Writer) *cobra.Command
- func NewKubectlCommand(f *koliutil.Factory, in io.Reader, out, err io.Writer) *cobra.Command
- func ReapResult(r *resource.Result, f cmdutil.Factory, out io.Writer, ...) error
- func RunDelete(comm *koliutil.CommandParams, args []string, options *DeleteOptions) error
- func RunDescribe(comm *koliutil.CommandParams, args []string, options *DescribeOptions, ...) error
- func RunGet(comm *koliutil.CommandParams, args []string, options *GetOptions) error
- func RunLabel(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, ...) error
- func RunScale(comm *koliutil.CommandParams, args []string, shortOutput bool, ...) error
- func ValidateParams(paramSpec []kubectl.GeneratorParam, params map[string]interface{}) error
- type AttachOptions
- type DefaultRemoteAttach
- type DefaultRemoteExecutor
- type DeleteOptions
- type DeploymentBasicGeneratorV1
- type DescribeOptions
- type ExecOptions
- type GetOptions
- type Link
- type LogsOptions
- type PortForwardOptions
- type RemoteAttach
- type RemoteExecutor
- type ScaleOptions
- type StreamOptions
Constants ¶
const ( // PossibleResourceTypes help description PossibleResourceTypes = `` /* 198-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func CreateDeploy ¶
func CreateDeploy(comm *koliutil.CommandParams, args []string) error
CreateDeploy implements the behavior to run the create deploy command
func CreateNamespace ¶
func CreateNamespace(f *koliutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error
CreateNamespace adds a new namespace in the controller API
func DeleteResult ¶
func DeleteResult(r *resource.Result, out io.Writer, ignoreNotFound bool, shortOutput bool, mapper meta.RESTMapper) error
DeleteResult .
func DescribeMatchingResources ¶
func DescribeMatchingResources(mapper meta.RESTMapper, typer runtime.ObjectTyper, f cmdutil.Factory, namespace, rsrc, prefix string, describerSettings *kubectl.DescriberSettings, out io.Writer, originalError error) error
DescribeMatchingResources .
func NewCmdCreateAddOn ¶
func NewCmdCreateAddOn(comm *koliutil.CommandParams) *cobra.Command
NewCmdCreateAddOn create pre-defined applications in the form of deployments
func NewCmdCreateDeploy ¶
func NewCmdCreateDeploy(comm *koliutil.CommandParams) *cobra.Command
NewCmdCreateDeploy is a macro command to create a new deployment
func NewCmdCreateLinks ¶
func NewCmdCreateLinks(comm *koliutil.CommandParams) *cobra.Command
NewCmdCreateLinks creates a command object for allowing traffic between namespaces
func NewCmdCreateNamespace ¶
NewCmdCreateNamespace is a macro command to create a new namespace
func NewCmdDescribe ¶
func NewCmdDescribe(comm *koliutil.CommandParams) *cobra.Command
NewCmdDescribe .
func NewCmdGet ¶
func NewCmdGet(comm *koliutil.CommandParams) *cobra.Command
NewCmdGet creates a command object for the generic "get" action, which retrieves one or more resources from a server.
func NewCmdLabel ¶
NewCmdLabel .
func NewCmdLogin ¶
func NewCmdLogin(comm *koliutil.CommandParams, pathOptions *clientcmd.PathOptions) *cobra.Command
NewCmdLogin .
func NewCmdLogs ¶
func NewCmdLogs(comm *koliutil.CommandParams) *cobra.Command
NewCmdLogs creates a new pod logs command
func NewCmdPortForward ¶
func NewCmdPortForward(comm *koliutil.CommandParams) *cobra.Command
NewCmdPortForward .
func NewCmdScale ¶
func NewCmdScale(comm *koliutil.CommandParams) *cobra.Command
NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
func NewCmdVersion ¶
NewCmdVersion command for printing the version of client and server
func NewKubectlCommand ¶
NewKubectlCommand creates the `kubectl` command and its nested children.
func ReapResult ¶
func ReapResult(r *resource.Result, f cmdutil.Factory, out io.Writer, isDefaultDelete, ignoreNotFound bool, timeout time.Duration, gracePeriod int, shortOutput bool, mapper meta.RESTMapper, quiet bool) error
ReapResult .
func RunDelete ¶
func RunDelete(comm *koliutil.CommandParams, args []string, options *DeleteOptions) error
RunDelete .
func RunDescribe ¶
func RunDescribe(comm *koliutil.CommandParams, args []string, options *DescribeOptions, ds *kubectl.DescriberSettings) error
RunDescribe .
func RunGet ¶
func RunGet(comm *koliutil.CommandParams, args []string, options *GetOptions) error
RunGet implements the generic Get command
func RunLabel ¶
func RunLabel(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *kubecmd.LabelOptions) error
RunLabel .
func RunScale ¶
func RunScale(comm *koliutil.CommandParams, args []string, shortOutput bool, options *ScaleOptions) error
RunScale executes the scaling
func ValidateParams ¶
func ValidateParams(paramSpec []kubectl.GeneratorParam, params map[string]interface{}) error
ValidateParams ensures that all required params are present in the params map
Types ¶
type AttachOptions ¶
type AttachOptions struct { StreamOptions CommandName string Pod *api.Pod Attach RemoteAttach PodClient coreclient.PodsGetter Config *restclient.Config }
AttachOptions declare the arguments accepted by the Exec command
func (*AttachOptions) Complete ¶
func (p *AttachOptions) Complete(comm *koliutil.CommandParams, argsIn []string) error
Complete verifies command line arguments and loads data from the command environment
func (*AttachOptions) GetContainerName ¶
func (p *AttachOptions) GetContainerName(pod *api.Pod) (string, error)
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 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 ¶
type DeleteOptions struct { Filenames []string Recursive bool IsNamespaced bool IsResourceSlashed bool }
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 DeploymentBasicGeneratorV1 ¶
type DeploymentBasicGeneratorV1 struct { Name string Paused bool ComputeResources api.ResourceList Repository string Release string }
DeploymentBasicGeneratorV1 supports stable generation of a deployment
func (DeploymentBasicGeneratorV1) ParamNames ¶
func (DeploymentBasicGeneratorV1) ParamNames() []kubectl.GeneratorParam
ParamNames .
func (*DeploymentBasicGeneratorV1) StructuredGenerate ¶
func (s *DeploymentBasicGeneratorV1) StructuredGenerate() (runtime.Object, error)
StructuredGenerate outputs a deployment object using the configured fields
type DescribeOptions ¶
type DescribeOptions struct { Filenames []string Recursive bool IsNamespaced bool IsResourceSlashed bool }
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 ExecOptions ¶
type ExecOptions struct { StreamOptions Command []string Executor RemoteExecutor PodClient coreclient.PodsGetter Config *restclient.Config }
ExecOptions declare the arguments accepted by the Exec command
func (*ExecOptions) Complete ¶
func (p *ExecOptions) Complete(comm *koliutil.CommandParams, 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 GetOptions ¶
type GetOptions struct { Filenames []string Recursive bool IsNamespaced bool IsSingleResourceType bool IsResourceSlashed bool Raw 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 Link ¶
type Link struct { Name string `json:"name"` ServiceDNS string `json:"service_dns"` NetworkPolicy string `json:"networkpolicy"` Port int `json:"port"` Service string `json:"service"` Status string `json:"status"` }
Link represents a controller resource
type LogsOptions ¶
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 }
LogsOptions .
func (*LogsOptions) Complete ¶
func (o *LogsOptions) Complete(comm *koliutil.CommandParams, args []string) error
Complete .
func (LogsOptions) RunLogs ¶
func (o LogsOptions) RunLogs() (int64, error)
RunLogs retrieves a pod log
type PortForwardOptions ¶
type PortForwardOptions struct { Namespace string PodName string Config *restclient.Config PodClient coreclient.PodsGetter Ports []string PortForwarder portForwarder StopChannel chan struct{} ReadyChannel chan struct{} }
PortForwardOptions contains all the options for running the port-forward cli command.
func (*PortForwardOptions) Complete ¶
func (o *PortForwardOptions) Complete(comm *koliutil.CommandParams, args []string) error
Complete completes all the required options for port-forward cmd.
func (PortForwardOptions) RunPortForward ¶
func (o PortForwardOptions) RunPortForward() error
RunPortForward implements all the necessary functionality for port-forward cmd.
func (PortForwardOptions) Validate ¶
func (o PortForwardOptions) Validate() error
Validate validates all the required options for port-forward cmd.
type RemoteAttach ¶
type RemoteAttach interface {
Attach(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue term.TerminalSizeQueue) 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, terminalSizeQueue term.TerminalSizeQueue) error
}
RemoteExecutor defines the interface accepted by the Exec command - provided for test stubbing
type ScaleOptions ¶
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 StreamOptions ¶
type StreamOptions struct { Namespace string PodName string ContainerName string Stdin bool TTY bool // minimize unnecessary output Quiet bool // InterruptParent, if set, is used to handle interrupts while attached InterruptParent *interrupt.Handler In io.Reader Out io.Writer Err io.Writer // contains filtered or unexported fields }
StreamOptions .