NewWithValues will construct a node struct with a drain helper and an uptime function
(nthConfig config.Config, drainHelper *drain.Helper, uptime uptime.UptimeFuncType)
| 112 | |
| 113 | // NewWithValues will construct a node struct with a drain helper and an uptime function |
| 114 | func NewWithValues(nthConfig config.Config, drainHelper *drain.Helper, uptime uptime.UptimeFuncType) (*Node, error) { |
| 115 | return &Node{ |
| 116 | nthConfig: nthConfig, |
| 117 | drainHelper: drainHelper, |
| 118 | uptime: uptime, |
| 119 | }, nil |
| 120 | } |
| 121 | |
| 122 | // CordonAndDrain will cordon the node and evict pods based on the config |
| 123 | func (n Node) CordonAndDrain(nodeName string, reason string, recorder recorderInterface) error { |
no outgoing calls