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 defaults. DefaultsConfigName = "config-defaults" // DefaultRevisionTimeoutSeconds will be set if timeoutSeconds not specified. DefaultRevisionTimeoutSeconds = 5 * 60 // DefaultMaxRevisionTimeoutSeconds will be set if MaxRevisionTimeoutSeconds is not specified. DefaultMaxRevisionTimeoutSeconds = 10 * 60 // DefaultUserContainerName is the default name we give to the container // specified by the user, if `name:` is omitted. DefaultUserContainerName = "user-container" // DefaultContainerConcurrency is the default container concurrency. It will be set if ContainerConcurrency is not specified. DefaultContainerConcurrency int64 = 0 // DefaultMaxRevisionContainerConcurrency is the maximum configurable // container concurrency. DefaultMaxRevisionContainerConcurrency int64 = 1000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
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 Defaults ¶
type Defaults struct { RevisionTimeoutSeconds int64 // This is the timeout set for cluster ingress. // RevisionTimeoutSeconds must be less than this value. MaxRevisionTimeoutSeconds int64 UserContainerNameTemplate string ContainerConcurrency int64 RevisionCPURequest *resource.Quantity RevisionCPULimit *resource.Quantity RevisionMemoryRequest *resource.Quantity RevisionMemoryLimit *resource.Quantity }
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.
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.