nodeshutdown

package
v1.30.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.23.0

type Config struct {
	Logger                           klog.Logger
	ProbeManager                     prober.Manager
	Recorder                         record.EventRecorder
	NodeRef                          *v1.ObjectReference
	GetPodsFunc                      eviction.ActivePodsFunc
	KillPodFunc                      eviction.KillPodFunc
	SyncNodeStatusFunc               func()
	ShutdownGracePeriodRequested     time.Duration
	ShutdownGracePeriodCriticalPods  time.Duration
	ShutdownGracePeriodByPodPriority []kubeletconfig.ShutdownGracePeriodByPodPriority
	StateDirectory                   string
	Clock                            clock.Clock
}

Config represents Manager configuration

type Manager

type Manager interface {
	Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult
	Start() error
	ShutdownStatus() error
}

Manager interface provides methods for Kubelet to manage node shutdown.

func NewManager

func NewManager(conf *Config) (Manager, lifecycle.PodAdmitHandler)

NewManager returns a new node shutdown manager.

Directories

Path Synopsis
Package systemd provides utility functions for kubelet to perform systemd related operations.
Package systemd provides utility functions for kubelet to perform systemd related operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL