Documentation ¶
Overview ¶
dataresidency holds the typed objects that define the schemas for default DataResidency for all components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigMapName ¶
func ConfigMapName() string
ConfigMapName returns the name of the configmap to read for default data residency settings.
Types ¶
type Config ¶
type Config struct {
DataResidencyDefaults *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 Defaults ¶
type Defaults struct { // ClusterDefaults are the data residency defaults to use for all namepaces ClusterDefaults ScopedDefaults `json:"clusterDefaults,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) AllowedPersistenceRegions ¶
AllowedPersistenceRegions gets the AllowedPersistenceRegions setting in the default.
func (*Defaults) ComputeAllowedPersistenceRegions ¶
func (d *Defaults) ComputeAllowedPersistenceRegions(topicConfig *pubsub.TopicConfig) bool
ComputeAllowedPersistenceRegions computes the final message storage policy in topicConfig. Return true if the topicConfig is updated.
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.
type ScopedDefaults ¶
type ScopedDefaults struct { // AllowedPersistenceRegions specifies the regions allowed for data // storage. Eg "us-east1". An empty configuration means no data residency // constraints. AllowedPersistenceRegions []string `json:"messagestoragepolicy.allowedpersistenceregions,omitempty"` }
ScopedDefaults are the data residency setting defaults.
func (*ScopedDefaults) DeepCopy ¶
func (in *ScopedDefaults) DeepCopy() *ScopedDefaults
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedDefaults.
func (*ScopedDefaults) DeepCopyInto ¶
func (in *ScopedDefaults) DeepCopyInto(out *ScopedDefaults)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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.
type StoreSingleton ¶
type StoreSingleton struct {
// contains filtered or unexported fields
}
+k8s:deepcopy-gen=false