kubernetes/pkg/controller/serviceaccount/tokens_controller.go

var RemoveTokenBackoff

type TokensControllerOptions

// NewTokensController returns a new *TokensController.
func NewTokensController(serviceAccounts informers.ServiceAccountInformer, secrets informers.SecretInformer, cl clientset.Interface, options TokensControllerOptions) (*TokensController, error) {}

type TokensController

// Run runs controller blocks until stopCh is closed
func (e *TokensController) Run(ctx context.Context, workers int) {}

func (e *TokensController) queueServiceAccountSync(obj interface{}

func (e *TokensController) queueServiceAccountUpdateSync(oldObj interface{}

// complete optionally requeues key, then calls queue.Done(key)
func retryOrForget[T comparable](logger klog.Logger, queue workqueue.TypedRateLimitingInterface[T], key T, requeue bool, maxRetries int) {}

func (e *TokensController) queueSecretSync(obj interface{}

func (e *TokensController) queueSecretUpdateSync(oldObj interface{}

func (e *TokensController) syncServiceAccount(ctx context.Context) {}

func (e *TokensController) syncSecret(ctx context.Context) {}

func (e *TokensController) deleteTokens(serviceAccount *v1.ServiceAccount) ( /*retry*/ bool, error) {}

func (e *TokensController) deleteToken(ns, name string, uid types.UID) ( /*retry*/ bool, error) {}

func (e *TokensController) secretUpdateNeeded(secret *v1.Secret) (bool, bool, bool) {}

// generateTokenIfNeeded populates the token data for the given Secret if not already set
func (e *TokensController) generateTokenIfNeeded(logger klog.Logger, serviceAccount *v1.ServiceAccount, cachedSecret *v1.Secret) ( /* retry */ bool, error) {}

// removeSecretReference updates the given ServiceAccount to remove a reference to the given secretName if needed.
func (e *TokensController) removeSecretReference(saNamespace string, saName string, saUID types.UID, secretName string) error {}

func (e *TokensController) getServiceAccount(ns string, name string, uid types.UID, fetchOnCacheMiss bool) (*v1.ServiceAccount, error) {}

func (e *TokensController) getSecret(ns string, name string, uid types.UID, fetchOnCacheMiss bool) (*v1.Secret, error) {}

// listTokenSecrets returns a list of all of the ServiceAccountToken secrets that
// reference the given service account's name and uid
func (e *TokensController) listTokenSecrets(serviceAccount *v1.ServiceAccount) ([]*v1.Secret, error) {}

func getSecretReferences(serviceAccount *v1.ServiceAccount) sets.String {}

type serviceAccountQueueKey

func makeServiceAccountKey(sa *v1.ServiceAccount) serviceAccountQueueKey {}

func parseServiceAccountKey(key interface{}

type secretQueueKey

func makeSecretQueueKey(secret *v1.Secret) secretQueueKey {}

func parseSecretQueueKey(key interface{}

// produce the same key format as cache.MetaNamespaceKeyFunc
func makeCacheKey(namespace, name string) string {}