Documentation ¶
Index ¶
- Constants
- func IsRetryableError(err error) bool
- func NewDialer() *connrotation.Dialer
- type Client
- func NewClientFromKubeletKubeconfig() (client *Client, err error)
- func NewClientFromPKI(ca, crt, key []byte, endpoint *url.URL) (client *Client, err error)
- func NewForConfig(config *restclient.Config) (client *Client, err error)
- func NewTemporaryClientFromPKI(ca *x509.PEMEncodedCertificateAndKey, endpoint *url.URL) (client *Client, err error)
- func (h *Client) Close() error
- func (h *Client) Cordon(ctx context.Context, name string) error
- func (h *Client) CordonAndDrain(ctx context.Context, node string) (err error)
- func (h *Client) Drain(ctx context.Context, node string) error
- func (h *Client) LabelNodeAsControlPlane(ctx context.Context, name string, taintNoSchedule bool) (err error)
- func (h *Client) NodeIPs(ctx context.Context, machineType machine.Type) (addrs []string, err error)
- func (h *Client) Uncordon(ctx context.Context, name string, force bool) error
- func (h *Client) WaitUntilReady(ctx context.Context, name string) error
Constants ¶
View Source
const ( // DrainTimeout is maximum time to wait for the node to be drained. DrainTimeout = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func IsRetryableError ¶
IsRetryableError returns true if this Kubernetes API should be retried.
Types ¶
type Client ¶
type Client struct { *kubernetes.Clientset // contains filtered or unexported fields }
Client represents a set of helper methods for interacting with the Kubernetes API.
func NewClientFromKubeletKubeconfig ¶
NewClientFromKubeletKubeconfig initializes and returns a Client.
func NewClientFromPKI ¶
NewClientFromPKI initializes and returns a Client.
func NewForConfig ¶
func NewForConfig(config *restclient.Config) (client *Client, err error)
NewForConfig initializes and returns a client using the provided config.
func NewTemporaryClientFromPKI ¶
func NewTemporaryClientFromPKI(ca *x509.PEMEncodedCertificateAndKey, endpoint *url.URL) (client *Client, err error)
NewTemporaryClientFromPKI initializes a Kubernetes client using a certificate with a TTL of 10 minutes.
func (*Client) CordonAndDrain ¶
CordonAndDrain cordons and drains a node in one call.
func (*Client) LabelNodeAsControlPlane ¶
func (h *Client) LabelNodeAsControlPlane(ctx context.Context, name string, taintNoSchedule bool) (err error)
LabelNodeAsControlPlane labels a node with the required control-plane label and NoSchedule taint.
Click to show internal directories.
Click to hide internal directories.