Documentation ¶
Index ¶
- Constants
- func InitIntrumentation(ctx context.Context) context.Context
- func InstMainLoopCompletingInstance(ctx context.Context, instance collectors.Instance)
- func InstMainLoopCordoningInstance(ctx context.Context, instance collectors.Instance)
- func InstMainLoopDeletingLifecycleMessage(ctx context.Context, instance collectors.Instance)
- func InstMainLoopDeletingLifecycleMessageAgeSanityCheckFailed(ctx context.Context, instance collectors.Instance, age time.Duration)
- func InstMainLoopEvictPod(ctx context.Context, pod collectors.Pod)
- func InstMainLoopNoop(ctx context.Context)
- func InstMainLoopStarted(ctx context.Context, instances collectors.Instances, pods collectors.Pods)
- func InstancesReadyForEviction() collectors.InstanceSelector
- func InstancesThanNeedLifecycleDeletion() collectors.InstanceSelector
- func InstancesThatNeedCordon() collectors.InstanceSelector
- func InstancesThatNeedLifecycleCompletion() collectors.InstanceSelector
- func InstancesThatWantShutdown() collectors.InstanceSelector
- func NewRootCommand() *cobra.Command
- func PodsReadyForEviction() collectors.PodSelector
- func PodsThatWantEviction() collectors.PodSelector
- func PodsUnreadyForEviction() collectors.PodSelector
- func SortInstances(instances collectors.Instances)
- func SortPods(pods collectors.Pods)
- type HealthHandler
- type Healthier
- type MainLoop
- type Runner
- type Server
Constants ¶
View Source
const ( TaintSoft = `node-drainer.rebuy-de.github.io/soft-shutdown` TaintHard = `node-drainer.rebuy-de.github.io/hard-shutdown` )
Variables ¶
This section is empty.
Functions ¶
func InstMainLoopCompletingInstance ¶
func InstMainLoopCompletingInstance(ctx context.Context, instance collectors.Instance)
func InstMainLoopCordoningInstance ¶
func InstMainLoopCordoningInstance(ctx context.Context, instance collectors.Instance)
func InstMainLoopDeletingLifecycleMessage ¶
func InstMainLoopDeletingLifecycleMessage(ctx context.Context, instance collectors.Instance)
func InstMainLoopEvictPod ¶
func InstMainLoopEvictPod(ctx context.Context, pod collectors.Pod)
func InstMainLoopNoop ¶
func InstMainLoopStarted ¶
func InstMainLoopStarted(ctx context.Context, instances collectors.Instances, pods collectors.Pods)
func InstancesReadyForEviction ¶
func InstancesReadyForEviction() collectors.InstanceSelector
func InstancesThanNeedLifecycleDeletion ¶
func InstancesThanNeedLifecycleDeletion() collectors.InstanceSelector
func InstancesThatNeedCordon ¶
func InstancesThatNeedCordon() collectors.InstanceSelector
func InstancesThatNeedLifecycleCompletion ¶
func InstancesThatNeedLifecycleCompletion() collectors.InstanceSelector
func InstancesThatWantShutdown ¶
func InstancesThatWantShutdown() collectors.InstanceSelector
func NewRootCommand ¶
func PodsReadyForEviction ¶
func PodsReadyForEviction() collectors.PodSelector
func PodsThatWantEviction ¶
func PodsThatWantEviction() collectors.PodSelector
func PodsUnreadyForEviction ¶
func PodsUnreadyForEviction() collectors.PodSelector
func SortInstances ¶
func SortInstances(instances collectors.Instances)
func SortPods ¶
func SortPods(pods collectors.Pods)
Types ¶
type HealthHandler ¶
type HealthHandler struct {
// contains filtered or unexported fields
}
HealthHandler is a http.Handler that is used for the lifeness probe.
func (HealthHandler) ServeHTTP ¶
func (h HealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP reponds 200, when all services are healhy. Otherwise it responds with 503.
type Healthier ¶
type Healthier interface {
Healthy() bool
}
Healthier is a simple interface, that can easily be implemented by all critical services. It is used to indicate their health statuses.
type MainLoop ¶
type MainLoop struct {
// contains filtered or unexported fields
}
MainLoop does the actual node-drainer actions. When any client cache changes, it starts a new update loop and checks whether an action is required.
func NewMainLoop ¶
func NewMainLoop(collectors collectors.Collectors) *MainLoop
NewMainLoop initializes a MainLoop.
Click to show internal directories.
Click to hide internal directories.