tokeninvalidator

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "token-invalidator"

ControllerName is the name of the controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	TargetClient client.Client
	TargetReader client.Reader
	Config       resourcemanagerconfigv1alpha1.TokenInvalidatorControllerConfig

	// RateLimiter allows limiting exponential backoff for testing purposes
	RateLimiter workqueue.TypedRateLimiter[reconcile.Request]
}

Reconciler labels secrets whose tokens should be invalidated.

func (*Reconciler) AddToManager

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

AddToManager adds Reconciler to the given manager.

func (*Reconciler) MapServiceAccountToSecrets

func (r *Reconciler) MapServiceAccountToSecrets(_ context.Context, obj client.Object) []reconcile.Request

MapServiceAccountToSecrets maps the ServiceAccount to all referenced secrets.

func (*Reconciler) Reconcile

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

Reconcile labels secrets whose tokens should be invalidated.

func (*Reconciler) SecretPredicate

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

SecretPredicate returns the predicate for secrets.

func (*Reconciler) ServiceAccountPredicate

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

ServiceAccountPredicate returns the predicate for service accounts.

Jump to

Keyboard shortcuts

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