tokenrequestor

package
v1.155.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Index

Constants

View Source
const ControllerName = "token-requestor"

ControllerName is the name of the controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	SourceClient    client.Client
	TargetClient    client.Client
	ConcurrentSyncs int
	Clock           clock.Clock
	JitterFunc      func(time.Duration, float64) time.Duration
	Classes         []string
	APIAudiences    []string
	CAData          []byte

	// Deprecated: Always use the serviceaccount.resources.gardener.cloud/namespace annotation to specify the namespace for the requested ServiceAccount.
	// TODO(timuthy): Drop the default namespace after Gardener v1.162 has been released. Assuming a default namespace is too confusing since the TokenRequestor setup depends on the cluster types involved (Self-Hosted Shoot, Garden-Runtime, Seed).
	TargetDefaultNamespace TargetDefaultNamespaceFn
}

Reconciler requests and refreshes tokens via the TokenRequest API.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(mgr manager.Manager, sourceCluster, targetCluster cluster.Cluster) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) Reconcile

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

Reconcile requests and populates tokens.

func (*Reconciler) SecretPredicate

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

SecretPredicate is the predicate for secrets.

type TargetDefaultNamespaceFn

type TargetDefaultNamespaceFn func(context.Context, client.Client) (string, error)

TargetDefaultNamespaceFn is a function that returns the namespace that requested ServiceAccounts should be created in

Jump to

Keyboard shortcuts

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