secretnamechange

package
v1.150.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "secret-name-change"

ControllerName is the name of this controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	Client        client.Client
	ConfigDir     string
	FS            afero.Afero
	CancelContext context.CancelFunc
}

Reconciler checks if the label containing the relevant OSC secret for this node is changed and restarts if so. For hosted shoots, this never happens: During the lifecycle of a node, the OSC secret name is fixed. For self-hosted shoots, this may happen after the initial connect of the Shoot to the garden cluster: `gardenadm init` may not have run with the final spec of the Shoot (after registering it with gardener-apiserver, the spec might be augmented via admission plugins or webhooks). Hence, when gardenlet reconciles for the first time, it might compute a different OSC secret name. Without this controller, gardener-node-agent would have no means to switch to this new secret since its component config dictates which OSC secret to watch. This controller reacts on changes of said label on the node. If a change is detected, it overwrites the secret name in the component config and cancels the context (which triggers a restart to re-read the new config).

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(mgr manager.Manager, nodePredicate predicate.Predicate) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) NodePredicate

func (r *Reconciler) NodePredicate() predicate.Predicate

NodePredicate returns 'true' when the label describing which gardener-node-agent secret is relevant for this node gets set or changed.

func (*Reconciler) Reconcile

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

Reconcile checks if the label containing the relevant OSC secret for this node is changed and restarts if so.

Jump to

Keyboard shortcuts

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