kubernetes

package
v0.0.0-...-ac74c47 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PodFromFile

func PodFromFile(path string) (*corev1.Pod, error)

PodFromFile builds a Pod from a local file.

Types

type PodResourceManager

type PodResourceManager interface {
	// WatchPod keeps track of resources related to the passed Pod.
	Watch(pod *corev1.Pod)
	// UnwatchPod stops tracking resources related to the passed Pod.
	Unwatch(pod *corev1.Pod)
	// EventHandlerFuncs sets up the event handlers for the watched resources.
	// EventHandlerFuncs sets up the event handlers for the watched resources.
	EventHandlerFuncs(ctx context.Context, updater ResourceUpdater) cache.ResourceEventHandlerFuncs
	// ConfigMapLister lists ConfigMap resources.
	ConfigMapLister() listersv1.ConfigMapLister
	// SecretLister lists Secret resources.
	SecretLister() listersv1.SecretLister
}

PodResourceManager provides list and watch for Pods' related ConfigMaps and Secrets.

func NewPodResourceWatcher

func NewPodResourceWatcher(informerFactory informers.SharedInformerFactory) PodResourceManager

type ResourceUpdater

type ResourceUpdater interface {
	// UpdateConfigMap handles a ConfigMap update.
	UpdateConfigMap(ctx context.Context, pod *corev1.Pod, configMap *corev1.ConfigMap) error
	// UpdateSecret handles a Secret update.
	UpdateSecret(ctx context.Context, pod *corev1.Pod, secret *corev1.Secret) error
}

The ResourceUpdater handles events for a ConfigMap of Secret referenced by a known Pod. This is meant to be implemented by a Provider implementation.

Jump to

Keyboard shortcuts

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