Documentation ¶
Index ¶
- func LocalStoragePodFilter(p apiv1.Pod) (bool, error)
- func MirrorPodFilter(p apiv1.Pod) (bool, error)
- func UnreplicatedPodFilter(p apiv1.Pod) (bool, error)
- type ClientConfig
- type ClientGenerator
- type PodFilterFunc
- func NewDaemonSetPodFilter(ctx context.Context, client kubernetes.Interface) PodFilterFunc
- func NewPodFilters(filters ...PodFilterFunc) PodFilterFunc
- func NewStatefulSetPodFilter(ctx context.Context, client kubernetes.Interface) PodFilterFunc
- func UnprotectedPodFilter(annotations ...string) PodFilterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalStoragePodFilter ¶
LocalStoragePodFilter returns true if the supplied pod does not have local storage, i.e. does not use any 'empty dir' volumes.
func MirrorPodFilter ¶
MirrorPodFilter returns true if the supplied pod is not a mirror pod, i.e. a pod created by a manifest on the node rather than the API server.
Types ¶
type ClientConfig ¶
type ClientGenerator ¶
type ClientGenerator interface { KubeClient() (kubernetes.Interface, error) NodeManagerClient() (managednodeClientset.Interface, error) ApiExtentionClient() (apiextension.Interface, error) PodList(nodeName string, podFilter PodFilterFunc) ([]apiv1.Pod, error) NodeList() (*apiv1.NodeList, error) GetNode(nodeName string) (*apiv1.Node, error) SetProviderID(nodeName, providerID string) error UncordonNode(nodeName string) error CordonNode(nodeName string) error MarkDrainNode(nodeName string) error DrainNode(nodeName string, ignoreDaemonSet, deleteLocalData bool) error DeleteNode(nodeName string) error AnnoteNode(nodeName string, annotations map[string]string) error LabelNode(nodeName string, labels map[string]string) error TaintNode(nodeName string, taints ...apiv1.Taint) error GetSecret(secretName, namespace string) (*apiv1.Secret, error) DeleteSecret(secretName, namespace string) error WaitNodeToBeReady(nodeName string) error }
ClientGenerator provides clients
func NewClientGenerator ¶
func NewClientGenerator(cfg ClientConfig) ClientGenerator
type PodFilterFunc ¶
A PodFilterFunc returns true if the supplied pod passes the filter.
func NewDaemonSetPodFilter ¶
func NewDaemonSetPodFilter(ctx context.Context, client kubernetes.Interface) PodFilterFunc
NewDaemonSetPodFilter returns a FilterFunc that returns true if the supplied pod is not managed by an extant DaemonSet.
func NewPodFilters ¶
func NewPodFilters(filters ...PodFilterFunc) PodFilterFunc
NewPodFilters returns a FilterFunc that returns true if all of the supplied FilterFuncs return true.
func NewStatefulSetPodFilter ¶
func NewStatefulSetPodFilter(ctx context.Context, client kubernetes.Interface) PodFilterFunc
NewStatefulSetPodFilter returns a FilterFunc that returns true if the supplied pod is not managed by an extant StatefulSet.
func UnprotectedPodFilter ¶
func UnprotectedPodFilter(annotations ...string) PodFilterFunc
UnprotectedPodFilter returns a FilterFunc that returns true if the supplied pod does not have any of the user-specified annotations for protection from eviction