exit

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const RestartSignal = syscall.SIGUSR2

RestartSignal is the signal that causes the pod to be restarted.

Variables

This section is empty.

Functions

func Restart

func Restart(
	ctx context.Context,
	k8sClient ctrlclient.Client,
	reason string) error

Restart instructs the Deployment responsible for this pod to do a rollout, restarting all of the replicas. By using this method, at least one pod is always up and responsive.

Types

type RestartSignalHandler

type RestartSignalHandler interface {
	Close()
	Closed() <-chan struct{}
}

RestartSignalHandler waits to receive a signal that tells the pod to restart.

func NewRestartSignalHandler

func NewRestartSignalHandler(
	ctx context.Context,
	k8sClient ctrlclient.Client,
	elected <-chan struct{}) RestartSignalHandler

NewRestartSignalHandler returns a new signal handler that waits to receive a SIGUSR2 signal, upon which the pod is restarted via the package's Restart(context.Context, ctrlclient.Client, string) error method. Calling the handler's Close() method will stop the signal handler.

Jump to

Keyboard shortcuts

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