Documentation ¶
Overview ¶
Package deployment manages the deployment config.
Index ¶
Constants ¶
const ( // ConfigName is the name of config map for the deployment. ConfigName = "config-deployment" // QueueSidecarImageKey is the config map key for queue sidecar image. QueueSidecarImageKey = "queue-sidecar-image" // DeprecatedQueueSidecarImageKey is the config map key for queue sidecar image. DeprecatedQueueSidecarImageKey = "queueSidecarImage" // ProgressDeadlineDefault is the default value for the config's // ProgressDeadlineSeconds. This matches the K8s default value of 600s. ProgressDeadlineDefault = 600 * time.Second // ProgressDeadlineKey is the key to configure deployment progress deadline. ProgressDeadlineKey = "progress-deadline" RuntimeClassNameKey = "runtime-class-name" )
Variables ¶
var ( // QueueSidecarCPURequestDefault is the default request.cpu to set for the // queue sidecar. It is set at 25m for backwards-compatibility since this was // the historic default before the field was operator-settable. QueueSidecarCPURequestDefault = resource.MustParse("25m") // QueueSidecarCPULimitDefault is the default limit.cpu to set for the // queue sidecar. QueueSidecarCPULimitDefault = resource.MustParse("1000m") // QueueSidecarMemoryRequestDefault is the default request.memory to set for the // queue sidecar. QueueSidecarMemoryRequestDefault = resource.MustParse("400Mi") // QueueSidecarMemoryLimitDefault is the default limit.memory to set for the // queue sidecar. QueueSidecarMemoryLimitDefault = resource.MustParse("800Mi") // QueueSidecarEphemeralStorageRequestDefault is the default request.ephemeral-storage set for the // queue sidecar. QueueSidecarEphemeralStorageRequestDefault = resource.MustParse("512Mi") // QueueSidecarEphemeralStorageLimitDefault is the default limit.ephemeral-storage to set for the // queue sidecar. QueueSidecarEphemeralStorageLimitDefault = resource.MustParse("1024Mi") )
Functions ¶
This section is empty.
Types ¶
type AffinityType ¶ added in v0.42.0
type AffinityType string
AffinityType specifies which affinity requirements will be automatically applied to the PodSpec of all Knative services.
const ( // None is used for deactivating affinity configuration for user workloads. None AffinityType = "none" // PreferSpreadRevisionOverNodes is used to set pod anti-affinity requirements for user workloads. PreferSpreadRevisionOverNodes AffinityType = "prefer-spread-revision-over-nodes" )
type Config ¶
type Config struct { // QueueSidecarImage is the name of the image used for the queue sidecar // injected into the revision pod. QueueSidecarImage string // Repositories for which tag to digest resolving should be skipped. RegistriesSkippingTagResolving sets.Set[string] // DigestResolutionTimeout is the maximum time allowed for image digest resolution. DigestResolutionTimeout time.Duration // ProgressDeadline is the time in seconds we wait for the deployment to // be ready before considering it failed. ProgressDeadline time.Duration // QueueSidecarCPURequest is the CPU Request to set for the queue proxy sidecar container. QueueSidecarCPURequest *resource.Quantity // QueueSidecarCPULimit is the CPU Limit to set for the queue proxy sidecar container. QueueSidecarCPULimit *resource.Quantity // QueueSidecarMemoryRequest is the Memory Request to set for the queue proxy sidecar container. QueueSidecarMemoryRequest *resource.Quantity // QueueSidecarMemoryLimit is the Memory Limit to set for the queue proxy sidecar container. QueueSidecarMemoryLimit *resource.Quantity // QueueSidecarEphemeralStorageRequest is the Ephemeral Storage Request to // set for the queue proxy sidecar container. QueueSidecarEphemeralStorageRequest *resource.Quantity // QueueSidecarEphemeralStorageLimit is the Ephemeral Storage Limit to set // for the queue proxy sidecar container. QueueSidecarEphemeralStorageLimit *resource.Quantity // QueueSidecarTokenAudiences is a set of strings defining required tokens - each string represent the token audience // used by the queue proxy sidecar container to create tokens for qpoptions. QueueSidecarTokenAudiences sets.Set[string] // QueueSidecarRootCA is a root certificate to be trusted by the queue proxy sidecar qpoptions. QueueSidecarRootCA string // DefaultAffinityType is a string that controls what affinity rules will be automatically // applied to the PodSpec of all Knative services. DefaultAffinityType AffinityType // RuntimeClassNames specifies which runtime the Pod will use RuntimeClassNames map[string]RuntimeClassNameLabelSelector }
Config includes the configurations for the controller.
func NewConfigFromConfigMap ¶
NewConfigFromConfigMap creates a DeploymentConfig from the supplied configMap.
func NewConfigFromMap ¶
NewConfigFromMap creates a DeploymentConfig from the supplied Map.
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuntimeClassNameLabelSelector ¶ added in v0.42.0
type RuntimeClassNameLabelSelector struct {
Selector map[string]string `json:"selector,omitempty"`
}
func (*RuntimeClassNameLabelSelector) DeepCopy ¶ added in v0.42.0
func (in *RuntimeClassNameLabelSelector) DeepCopy() *RuntimeClassNameLabelSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeClassNameLabelSelector.
func (*RuntimeClassNameLabelSelector) DeepCopyInto ¶ added in v0.42.0
func (in *RuntimeClassNameLabelSelector) DeepCopyInto(out *RuntimeClassNameLabelSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.