Documentation ¶
Index ¶
- type CLI
- func (c *CLI) CheckVersion(ctx context.Context) error
- func (c *CLI) Command(ctx context.Context, command string, arg ...string) *exec.Cmd
- func (c *CLI) CommandWithNamespaceArg(ctx context.Context, command string, namespace string, arg ...string) *exec.Cmd
- func (c *CLI) Run(ctx context.Context, in io.Reader, out io.Writer, command string, ...) error
- func (c *CLI) RunInNamespace(ctx context.Context, in io.Reader, out io.Writer, command string, ...) error
- func (c *CLI) RunOut(ctx context.Context, command string, arg ...string) ([]byte, error)
- func (c *CLI) Version(ctx context.Context) ClientVersion
- type ClientVersion
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
CLI holds parameters to run kubectl.
func NewFromRunContext ¶
func NewFromRunContext(runCtx *runcontext.RunContext) *CLI
func (*CLI) CheckVersion ¶
CheckVersion warns the user if their kubectl version is < 1.12.0
func (*CLI) Command ¶
Command creates the underlying exec.CommandContext. This allows low-level control of the executed command.
func (*CLI) CommandWithNamespaceArg ¶ added in v0.36.0
func (c *CLI) CommandWithNamespaceArg(ctx context.Context, command string, namespace string, arg ...string) *exec.Cmd
Command creates the underlying exec.CommandContext with namespace. This allows low-level control of the executed command.
func (*CLI) Run ¶
func (c *CLI) Run(ctx context.Context, in io.Reader, out io.Writer, command string, arg ...string) error
Run shells out kubectl CLI.
func (*CLI) RunInNamespace ¶ added in v0.36.0
func (c *CLI) RunInNamespace(ctx context.Context, in io.Reader, out io.Writer, command string, namespace string, arg ...string) error
RunInNamespace shells out kubectl CLI with given namespace
type ClientVersion ¶
ClientVersion is the client version of kubectl.
func (ClientVersion) String ¶
func (v ClientVersion) String() string
type Version ¶
type Version struct {
Client ClientVersion `json:"clientVersion"`
}
Version is the client version of kubectl.
Click to show internal directories.
Click to hide internal directories.