Documentation ¶
Index ¶
- Constants
- func IsRetryableError(err error) bool
- type Client
- func NewClientFromKubeletKubeconfig() (*Client, error)
- func NewClientFromPKI(ca, crt, key []byte, endpoint *url.URL) (*Client, error)
- func NewForConfig(config *restclient.Config) (*Client, error)
- func NewTemporaryClientControlPlane(ctx context.Context, r controller.Reader) (client *Client, err error)
- func NewTemporaryClientFromPKI(ca *x509.PEMEncodedCertificateAndKey, endpoint *url.URL) (client *Client, err 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 {
*taloskubernetes.Client
}
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, error)
NewForConfig initializes and returns a client using the provided config.
func NewTemporaryClientControlPlane ¶ added in v1.3.2
func NewTemporaryClientControlPlane(ctx context.Context, r controller.Reader) (client *Client, err error)
NewTemporaryClientControlPlane initializes a Kubernetes client for a controlplane node using PKI information.
The client uses "localhost" endpoint, so it doesn't depend on the loadbalancer to be ready.
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.
Click to show internal directories.
Click to hide internal directories.