package nodeshutdown
import "k8s.io/kubernetes/pkg/kubelet/nodeshutdown"
Package nodeshutdown can watch for node level shutdown events and trigger graceful termination of pods running on the node prior to a system shutdown.
Index ¶
- type Manager
- func NewManager(getPodsFunc eviction.ActivePodsFunc, killPodFunc eviction.KillPodFunc, syncNodeStatus func(), shutdownGracePeriodRequested, shutdownGracePeriodCriticalPods time.Duration) (*Manager, lifecycle.PodAdmitHandler)
- func (m *Manager) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult
- func (m *Manager) ShutdownStatus() error
- func (m *Manager) Start() error
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager has functions that can be used to interact with the Node Shutdown Manager.
func NewManager ¶
func NewManager(getPodsFunc eviction.ActivePodsFunc, killPodFunc eviction.KillPodFunc, syncNodeStatus func(), shutdownGracePeriodRequested, shutdownGracePeriodCriticalPods time.Duration) (*Manager, lifecycle.PodAdmitHandler)
NewManager returns a new node shutdown manager.
func (*Manager) Admit ¶
func (m *Manager) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult
Admit rejects all pods if node is shutting
func (*Manager) ShutdownStatus ¶
ShutdownStatus will return an error if the node is currently shutting down.
func (*Manager) Start ¶
Start starts the node shutdown manager and will start watching the node for shutdown events.
Source Files ¶
nodeshutdown_manager_linux.go
Directories ¶
Path | Synopsis |
---|---|
pkg/kubelet/nodeshutdown/systemd | Package systemd provides utility functions for kubelet to perform systemd related operations. |
- Version
- v1.22.3
- Published
- Oct 27, 2021
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 17 minutes ago –
Tools for package owners.