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 = 0 // DefaultMaxRevisionContainerConcurrency is the maximum configurable // container concurrency. DefaultMaxRevisionContainerConcurrency = 1000 // DefaultAllowContainerConcurrencyZero is whether, by default, // containerConcurrency can be set to zero (i.e. unbounded) by users. DefaultAllowContainerConcurrencyZero = true )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Defaults *Defaults Features *Features Autoscaler *autoscalerconfig.Config }
Config holds the collection of configurations that we attach to contexts.
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.
func (*Config) DeepCopy ¶ added in v0.19.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶ added in v0.19.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Defaults ¶
type Defaults struct { RevisionTimeoutSeconds int64 // This is the timeout set for ingress. // RevisionTimeoutSeconds must be less than this value. MaxRevisionTimeoutSeconds int64 UserContainerNameTemplate string ContainerConcurrency int64 // ContainerConcurrencyMaxLimit is the maximum permitted container concurrency // or target value in the system. ContainerConcurrencyMaxLimit int64 // AllowContainerConcurrencyZero determines whether users are permitted to specify // a containerConcurrency of 0 (i.e. unbounded). AllowContainerConcurrencyZero bool // Permits defaulting of `enableServiceLinks` pod spec field. // See: https://github.com/knative/serving/issues/8498 for details. EnableServiceLinks *bool RevisionCPURequest *resource.Quantity RevisionCPULimit *resource.Quantity RevisionMemoryRequest *resource.Quantity RevisionMemoryLimit *resource.Quantity RevisionEphemeralStorageRequest *resource.Quantity RevisionEphemeralStorageLimit *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 Features ¶ added in v0.16.0
type Features struct { MultiContainer Flag PodSpecAffinity Flag PodSpecDryRun Flag PodSpecFieldRef Flag PodSpecHostAliases Flag PodSpecNodeSelector Flag PodSpecRuntimeClassName Flag PodSpecSecurityContext Flag PodSpecTolerations Flag TagHeaderBasedRouting Flag AutoDetectHTTP2 Flag }
Features specifies which features are allowed by the webhook.
func NewFeaturesConfigFromConfigMap ¶ added in v0.16.0
NewFeaturesConfigFromConfigMap creates a Features from the supplied ConfigMap
func NewFeaturesConfigFromMap ¶ added in v0.16.0
NewFeaturesConfigFromMap creates a Features from the supplied Map
func (*Features) DeepCopy ¶ added in v0.16.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Features.
func (*Features) DeepCopyInto ¶ added in v0.16.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Flag ¶ added in v0.16.0
type Flag string
Flag is a string value which can be either Enabled, Disabled, or Allowed.
const ( // FeaturesConfigName is the name of the ConfigMap for the features. FeaturesConfigName = "config-features" // Enabled turns on an optional behavior. Enabled Flag = "Enabled" // Disabled turns off an optional behavior. Disabled Flag = "Disabled" // Allowed neither explicitly disables or enables a behavior. // eg. allow a client to control behavior with an annotation or allow a new value through validation. Allowed Flag = "Allowed" )
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.