kubernetes: k8s.io/kubernetes/pkg/kubelet/secret Index | Files

package secret

import "k8s.io/kubernetes/pkg/kubelet/secret"

Index

Package Files

fake_manager.go secret_manager.go

type Manager Uses

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)
}

Manager manages Kubernets secrets. This includes retrieving secrets or registering/unregistering them via Pods.

func NewCachingSecretManager Uses

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 Uses

func NewFakeManager() Manager

NewFakeManager creates empty/fake secret manager

func NewSimpleSecretManager Uses

func NewSimpleSecretManager(kubeClient clientset.Interface) Manager

NewSimpleSecretManager creates a new SecretManager instance.

func NewWatchingSecretManager Uses

func NewWatchingSecretManager(kubeClient clientset.Interface) Manager

NewWatchingSecretManager 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, we start individual watches for all

referenced objects that aren't referenced from other registered pods

- every GetObject() returns a value from local cache propagated via watches

Package secret imports 12 packages (graph) and is imported by 25 packages. Updated 2019-07-02. Refresh now. Tools for package owners.