Help us shape the future of Go! Take the 2026 Go Developer Survey

hostnamecheck

package
v1.143.3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const ControllerName = "hostname-check"

ControllerName is the name of this controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	CancelContext context.CancelFunc
	HostName      string
}

Reconciler checks periodically whether the hostname changed. If yes, it calls the cancel func. This is required because gardener-node-agent uses a label selector for kubernetes.io/hostname=<hostname> which no longer works in case the hostname of the node has changed. Calling the cancel func leads to terminating (and eventually restarting) the gardener-node-agent such that it can fetch the hostname again during start-up.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(mgr manager.Manager) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, _ reconcile.Request) (reconcile.Result, error)

Reconcile checks periodically whether the hostname changed. If yes, it calls the cancel func.

Jump to

Keyboard shortcuts

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