Documentation
¶
Index ¶
- Variables
- func EnsureDrain(ctx context.Context, node *v1.Node, log logr.Logger, params WaitParameters) error
- func EnsureSchedulable(ctx context.Context, k8sClient client.Client, node *v1.Node, schedulable bool) error
- func GetPodsForDrain(ctx context.Context, k8sClient client.Client, nodeName string) ([]v1.Pod, error)
- func WaitForPodDeletions(ctx context.Context, pods []v1.Pod, params WaitParameters) error
- func WeekdayFromString(s string) (time.Weekday, error)
- type WaitParameters
Constants ¶
This section is empty.
Variables ¶
View Source
var WeekdayMap = map[string]time.Weekday{ "monday": time.Monday, "mon": time.Monday, "tuesday": time.Tuesday, "tue": time.Tuesday, "wednesday": time.Wednesday, "wed": time.Wednesday, "thursday": time.Thursday, "thu": time.Thursday, "friday": time.Friday, "fri": time.Friday, "saturday": time.Saturday, "sat": time.Saturday, "sunday": time.Sunday, "sun": time.Sunday, }
Functions ¶
func EnsureDrain ¶
Drains Pods from the given node, if required.
func EnsureSchedulable ¶
func EnsureSchedulable(ctx context.Context, k8sClient client.Client, node *v1.Node, schedulable bool) error
Checks if the is Schedulable according to schedulable and patches the node if necessary.
func GetPodsForDrain ¶
func GetPodsForDrain(ctx context.Context, k8sClient client.Client, nodeName string) ([]v1.Pod, error)
Gets a list of pods to be deleted for a node to be considered drained. Shortened https://github.com/kinvolk/flatcar-linux-update-operator/blob/master/pkg/k8sutil/drain.go .
func WaitForPodDeletions ¶
Deletes the given pods and awaits there deletion.
Types ¶
Click to show internal directories.
Click to hide internal directories.