Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NamespaceSelectorKey is the name of the configuration // entry that specifies a LabelSelector to control which namespaces // the Sugar Controller operates on. NamespaceSelectorKey = "namespace-selector" // TriggerSelectorKey is the name of the configuration // entry that specifies a LabelSelector to control which triggers // the Sugar Controller operates on. TriggerSelectorKey = "trigger-selector" )
View Source
const ConfigName = "config-sugar"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// NamespaceSelector specifies a LabelSelector which
// determines which namespaces the Sugar Controller should operate upon
NamespaceSelector *metav1.LabelSelector
// TriggerSelector specifies a LabelSelector which
// determines which triggers the Sugar Controller should operate upon
TriggerSelector *metav1.LabelSelector
}
Config holds the collection of configurations that we attach to contexts.
func FromContext ¶
FromContext extracts a Config from the provided context.
func NewConfigFromConfigMap ¶
NewConfigFromConfigMap creates a Config from the supplied ConfigMap
func NewConfigFromMap ¶
NewConfigFromMap creates a Config from the supplied data.
type Store ¶
type Store struct {
*configmap.UntypedStore
}
Store is a typed wrapper around configmap.Untyped store to handle our configmaps.
func NewStore ¶
NewStore creates a new store of Configs and optionally calls functions when ConfigMaps are updated.
Click to show internal directories.
Click to hide internal directories.