hostnamecheck

package
v1.93.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 10 Imported by: 0

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