secret

package
v1.11.6-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Get secret by secret namespace and name.
	GetSecret(namespace, name string) (*v1.Secret, error)

	// RegisterPod registers all secrets from a given pod.
	RegisterPod(pod *v1.Pod)

	// UnregisterPod unregisters secrets from a given pod that are not
	// used by any other registered pod.
	UnregisterPod(pod *v1.Pod)
}

func NewCachingSecretManager

func NewCachingSecretManager(kubeClient clientset.Interface, getTTL manager.GetObjectTTLFunc) Manager

NewCachingSecretManager creates a manager that keeps a cache of all secrets necessary for registered pods. It implements the following logic:

  • whenever a pod is created or updated, the cached versions of all secrets are invalidated
  • every GetObject() call tries to fetch the value from local cache; if it is not there, invalidated or too old, we fetch it from apiserver and refresh the value in cache; otherwise it is just fetched from cache

func NewFakeManager

func NewFakeManager() Manager

func NewSimpleSecretManager

func NewSimpleSecretManager(kubeClient clientset.Interface) Manager

Jump to

Keyboard shortcuts

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