Documentation ¶
Overview ¶
Package config holds the typed objects that define the schemas for ConfigMap objects that pertain to our API objects.
Index ¶
Constants ¶
const ( // DefaultsConfigName is the name of config map for the default // configs that brokers should use DefaultsConfigName = "config-br-defaults" // BrokerDefaultsKey is the name of the key that's used for finding // defaults for broker configs. BrokerDefaultsKey = "default-br-config" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BrokerConfig ¶ added in v0.19.0
type BrokerConfig struct { *duckv1.KReference `json:",inline"` Delivery *eventingduckv1.DeliverySpec `json:"delivery,omitempty"` }
BrokerConfig contains configuration for a given broker. Allows configuring the reference to the config it should use and it's delivery.
func (*BrokerConfig) DeepCopy ¶ added in v0.19.0
func (in *BrokerConfig) DeepCopy() *BrokerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerConfig.
func (*BrokerConfig) DeepCopyInto ¶ added in v0.19.0
func (in *BrokerConfig) DeepCopyInto(out *BrokerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Config ¶
type Config struct {
Defaults *Defaults
}
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 DefaultConfig ¶ added in v0.43.0
type DefaultConfig struct { // DefaultBrokerClass and DefaultBrokerClassConfig are the default broker class for the whole cluster/namespace. // Users have to specify both of them DefaultBrokerClass string `json:"brokerClass,omitempty"` //Deprecated: Use the config in BrokerClasses instead *BrokerConfig `json:",inline"` // Optional: BrokerClasses are the default broker classes' config. The key is the broker class name, and the value is the config for that broker class. BrokerClasses map[string]*BrokerConfig `json:"brokerClasses,omitempty"` DisallowDifferentNamespaceConfig *bool `json:"disallowDifferentNamespaceConfig,omitempty"` }
DefaultConfig struct contains the default configuration for the cluster and namespace.
func (*DefaultConfig) DeepCopy ¶ added in v0.43.0
func (in *DefaultConfig) DeepCopy() *DefaultConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultConfig.
func (*DefaultConfig) DeepCopyInto ¶ added in v0.43.0
func (in *DefaultConfig) DeepCopyInto(out *DefaultConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Defaults ¶
type Defaults struct { // NamespaceDefaultsConfig are the default Broker Configs for each namespace. // Namespace is the key, the value is the NamespaceDefaultConfig NamespaceDefaultsConfig map[string]*DefaultConfig `json:"namespaceDefaults,omitempty"` // ClusterDefaultConfig is the default broker config for all the namespaces that // are not in NamespaceDefaultBrokerConfigs. Different broker class could have // different default config. ClusterDefaultConfig *DefaultConfig `json:"clusterDefault,omitempty"` }
Defaults includes the default values to be populated by the webhook.
func NewDefaultsConfigFromConfigMap ¶
NewDefaultsConfigFromConfigMap creates a Defaults from the supplied configMap
func NewDefaultsConfigFromMap ¶
NewDefaultsConfigFromMap creates a Defaults from the supplied Map
func (*Defaults) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Defaults.
func (*Defaults) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Defaults) GetBrokerClass ¶ added in v0.14.0
GetBrokerClass returns a namespace specific Broker Class, and if that doesn't exist, return a Cluster Default and if the defaults doesn't exist return an error.
func (*Defaults) GetBrokerConfig ¶
func (d *Defaults) GetBrokerConfig(ns string, brokerClassName *string) (*BrokerConfig, error)
GetBrokerConfig returns a namespace specific Broker Config, and if that doesn't exist, return a Cluster Default and if that doesn't exist return an error.
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.