Documentation ¶
Index ¶
- Constants
- func ReportEvent(ctx context.Context, cfg *config.Config, lvl log.Level, n NODE, ...)
- type NODE
- type Node
- func (n *Node) GetActionTimestamp() (time.Time, error)
- func (n *Node) GetKind() string
- func (n *Node) GetLabel() string
- func (n *Node) GetName() string
- func (n *Node) HasFreshLease(ctx context.Context, cfg *config.Config) (bool, error)
- func (n *Node) IsGrownUp(cfg *config.Config) bool
- func (n *Node) PrepareTermination(ctx context.Context, cfg *config.Config) (string, error)
- func (n *Node) RemoveActionTimestamp()
- func (n *Node) RemoveLabel()
- func (n *Node) Save(ctx context.Context, cfg *config.Config) error
- func (n *Node) SetActionTimestamp(t time.Time)
- func (n *Node) SetLabel(label string)
- func (n *Node) StartDrain(ctx context.Context, cfg *config.Config)
- func (n *Node) Taint()
- func (n *Node) Terminate(ctx context.Context, cfg *config.Config) (string, error)
- func (n *Node) Untaint()
Constants ¶
View Source
const ( TaintKey = "dbschenker.com/node-undertaker" TaintValue = "" Label = "dbschenker.com/node-undertaker" TimestampAnnotation = "dbschenker.com/node-undertaker-timestamp" )
View Source
const ( NodeUnhealthy string = "unhealthy" NodeTerminating = "terminating" NodeTainted = "tainted" NodeDraining = "draining" NodeHealthy = "" NodePreparingTermination = "preparing_termination" NodeTerminationPrepared = "termination_prepared" )
View Source
const (
ReportingController = "dbschenker.com/node-undertaker"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NODE ¶
type NODE interface { IsGrownUp(cfg *config.Config) bool HasFreshLease(ctx context.Context, cfg *config.Config) (bool, error) GetLabel() string RemoveLabel() RemoveActionTimestamp() SetLabel(label string) SetActionTimestamp(t time.Time) GetActionTimestamp() (time.Time, error) Taint() Untaint() StartDrain(ctx context.Context, cfg *config.Config) Terminate(ctx context.Context, cfg *config.Config) (string, error) PrepareTermination(ctx context.Context, cfg *config.Config) (string, error) Save(ctx context.Context, cfg *config.Config) error GetName() string GetKind() string }
type Node ¶
func CreateNode ¶
func (*Node) HasFreshLease ¶
func (*Node) PrepareTermination ¶
func (*Node) RemoveActionTimestamp ¶
func (n *Node) RemoveActionTimestamp()
func (*Node) RemoveLabel ¶
func (n *Node) RemoveLabel()
func (*Node) Save ¶
TODO: check if saving whole object works fine. Maybe it should be done using patches: https://stackoverflow.com/questions/57310483/whats-the-shortest-way-to-add-a-label-to-a-pod-using-the-kubernetes-go-client
func (*Node) SetActionTimestamp ¶
Click to show internal directories.
Click to hide internal directories.