Documentation
¶
Index ¶
- func GetParkedNodeExpiryTime(node v1.Node, expiresOnLabel string) (time.Time, error)
- func HandleOsSignals(cancel context.CancelFunc)
- func NodeHasLabel(node v1.Node, key string) bool
- func NodeHasTaint(node v1.Node, key string) bool
- func PodEvictionAllowed(pod v1.Pod, skipEvictionLabel string) bool
- func PodHasLabel(pod v1.Pod, key string) bool
- type AppContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetParkedNodeExpiryTime ¶
GetParkedNodeExpiryTime get the time a parked node TTL expires
func HandleOsSignals ¶
func HandleOsSignals(cancel context.CancelFunc)
HandleOsSignals gracefully handles OS signals
func NodeHasLabel ¶
NodeHasLabel check if a node has a specific label set
func NodeHasTaint ¶
NodeHasTaint check if a node has a taint set
func PodEvictionAllowed ¶
PodEvictionAllowed check if a pod has the `skipEvictionLabel`=false label set
Types ¶
type AppContext ¶
type AppContext struct { Context context.Context K8sClient kubernetes.Interface DynamicK8SClient dynamic.Interface Config config.Config // contains filtered or unexported fields }
AppContext struct stores a context and a k8s client
func NewAppContext ¶
func NewAppContext(cfg config.Config, dryRun bool) (*AppContext, error)
NewAppContext creates a new AppContext object
func (*AppContext) IsDryRun ¶
func (ac *AppContext) IsDryRun() bool
IsDryRun returns true if the "--dry-run" flag was provided
Click to show internal directories.
Click to hide internal directories.