Documentation ¶
Index ¶
- func DeletePods(client *kubernetes.Clientset, namespace string, selector map[string]string) error
- func DeleteSelf(client *kubernetes.Clientset, log logrus.FieldLogger) error
- func Drain(ctx context.Context, client *kubernetes.Clientset, nodeName string) error
- func GetNode(client *kubernetes.Clientset, server storage.Server) (*v1.Node, error)
- func Retry(ctx context.Context, fn func() error) error
- func RetryOnUpdateConflict(err error) error
- func SetUnschedulable(ctx context.Context, client corev1.NodeInterface, nodeName string, ...) error
- func UpdateLabels(ctx context.Context, client corev1.NodeInterface, nodeName string, ...) error
- func UpdateTaints(ctx context.Context, client corev1.NodeInterface, nodeName string, ...) error
- type EndpointAddrs
- type EndpointSubsets
- type Endpoints
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeletePods ¶
DeletePods deletes all pods matching selector using provided client
func DeleteSelf ¶
func DeleteSelf(client *kubernetes.Clientset, log logrus.FieldLogger) error
DeleteSelf deletes the pod this process is running as a part of.
func Drain ¶
Drain safely drains the specified node and uses Eviction API if supported on the api server.
func Retry ¶
Retry retries the specified function fn using classify to determine whether to Retry a particular error. Returns the first permanent error
func RetryOnUpdateConflict ¶
RetryOnUpdateConflict retries on update conflict errors (and temporary failures).
func SetUnschedulable ¶
func SetUnschedulable(ctx context.Context, client corev1.NodeInterface, nodeName string, unschedulable bool) error
SetUnschedulable marks the specified node as unschedulable depending on the value of the specified flag. Retries the operation internally on update conflicts.
func UpdateLabels ¶
func UpdateLabels(ctx context.Context, client corev1.NodeInterface, nodeName string, labels map[string]string) error
UpdateLabels adds labels on the node specified with nodeName
Types ¶
type EndpointAddrs ¶
type EndpointAddrs []v1.EndpointAddress
func (EndpointAddrs) String ¶
func (r EndpointAddrs) String() string
type EndpointSubsets ¶
type EndpointSubsets []v1.EndpointSubset
func (EndpointSubsets) String ¶
func (r EndpointSubsets) String() string