Documentation
¶
Overview ¶
Package exec is the KubectlClient that runs the kubectl binary through a CommandRunner.
Index ¶
- type Client
- func (c *Client) Apply(ctx context.Context, ns string, files ...string) error
- func (c *Client) CurrentContext(ctx context.Context) (string, error)
- func (c *Client) Get(ctx context.Context, ns, kind, name string) ([]byte, error)
- func (c *Client) Rollout(ctx context.Context, ns, kind, name string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client runs kubectl, optionally pinned to one kubeconfig context.
func New ¶
func New(runner interfaces.CommandRunner, kubeContext string) *Client
New returns the Client; kubeContext pins every call to that context when set. It does no I/O.
func (*Client) Apply ¶
Apply runs `kubectl apply -f file…`; no files is CodeInvalidInput, as the contract says (kubectl would refuse it too).
func (*Client) CurrentContext ¶
CurrentContext runs `kubectl config current-context`.
Click to show internal directories.
Click to hide internal directories.