Documentation ¶
Index ¶
Constants ¶
const ( // PingDefaultsConfigName is the name of config map for the default // configs that pings should use. PingDefaultsConfigName = "config-ping-defaults" DataMaxSizeKey = "data-max-size" // Legacy configuration item should be removed when a migration // update script is released. LegacyDataMaxSizeKey = "dataMaxSize" DefaultDataMaxSize = -1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
PingDefaults *PingDefaults
}
Config holds the collection of configurations that we attach to contexts. +k8s:deepcopy-gen=false
func FromContext ¶
FromContext extracts a Config from the provided context.
func FromContextOrDefaults ¶
FromContextOrDefaults is like FromContext, but when no Config is attached it returns a Config populated with the defaults for each of the Config fields.
type PingDefaults ¶
type PingDefaults struct {
DataMaxSize int64 `json:"data-max-size"`
}
PingDefaults includes the default values to be populated by the webhook.
func NewPingDefaultsConfigFromConfigMap ¶
func NewPingDefaultsConfigFromConfigMap(config *corev1.ConfigMap) (*PingDefaults, error)
NewPingDefaultsConfigFromConfigMap creates a PingDefaults from the supplied configMap
func NewPingDefaultsConfigFromMap ¶
func NewPingDefaultsConfigFromMap(data map[string]string) (*PingDefaults, error)
NewPingDefaultsConfigFromMap creates a Defaults from the supplied Map
func (*PingDefaults) DeepCopy ¶
func (d *PingDefaults) DeepCopy() *PingDefaults
func (*PingDefaults) GetPingConfig ¶
func (d *PingDefaults) GetPingConfig() *PingDefaults
type Store ¶
type Store struct {
*configmap.UntypedStore
}
Store is a typed wrapper around configmap.Untyped store to handle our configmaps. +k8s:deepcopy-gen=false
func NewStore ¶
NewStore creates a new store of Configs and optionally calls functions when ConfigMaps are updated.