Documentation ¶
Overview ¶
Package configmap exists to facilitate consuming Kubernetes ConfigMap resources in various ways, including:
- Watching them for changes over time, and
- Loading them from a VolumeMount.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Observer ¶
Observer is the signature of the callbacks that notify an observer of the latest state of a particular configuration. An observer should not modify the provided ConfigMap, and should `.DeepCopy()` it for persistence (or otherwise process its contents).
type Watcher ¶
type Watcher interface { // Watch is called to register a callback to be notified when a named ConfigMap changes. Watch(string, Observer) // Start is called to initiate the watches and provide a channel to signal when we should // stop watching. When Start returns, all registered Observers will be called with the // initial state of the ConfigMaps they are watching. Start(<-chan struct{}) error }
Watcher defined the interface that a configmap implementation must implement.
func NewDefaultWatcher ¶
func NewDefaultWatcher(kc kubernetes.Interface, ns string) Watcher
NewDefaultWatcher creates a new default configmap.Watcher instance.
func NewFixedWatcher ¶
NewFixedWatcher returns an Watcher that exposes the fixed collection of ConfigMaps.
Click to show internal directories.
Click to hide internal directories.