From 3ecb24f1c1a9cc49b2f9d287b253629d2a5deb4f Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Tue, 18 Jul 2023 20:24:09 +0100 Subject: [PATCH] upgrade to latest dependencies (#1828) bumping knative.dev/pkg eb63a40...7051d30: > 7051d30 Update community files (# 2764) > b7a11d4 Update community files (# 2763) > 5ef4812 Update community files (# 2762) > 49e2e56 update google cloud deps (# 2758) > a5e0b92 upgrade to latest dependencies (# 2757) > 6eb4b40 Update community files (# 2760) bumping knative.dev/client-pkg f377f06...e9d838e: > e9d838e Update community files (# 109) > f8021da Update community files (# 108) > 2311a7e Update community files (# 107) bumping knative.dev/serving 0462ce6...294cb9c: > 294cb9c Add log example for kourier and gateway-api (# 14178) > c0556c2 EnsureCleanup can skip clean up (# 14171) > 8d87d57 Update net-gateway-api nightly (# 14158) > de37d1e Update net-istio nightly (# 14173) > ac01fdb Update community files (# 14175) > b7c6b23 Update net-kourier nightly (# 14174) > 1183ad0 Update net-certmanager nightly (# 14172) > a7613e4 Update community files (# 14169) > c68d8f8 Update net-contour nightly (# 14165) > e5ad1c4 Update net-istio nightly (# 14164) > 6673893 Update net-certmanager nightly (# 14162) > a34bfd1 Update net-kourier nightly (# 14163) > 917d236 Remove domainmapping config (# 14161) > 4c76e3b Drop workaround pach for Istio (# 14156) > d97db13 Update net-kourier nightly (# 14160) > 1559c9b Bump net-certmanager manifests and add kapp ordering overlay (# 14148) > 52fe24e upgrade to latest dependencies (# 14155) > a5c8c2e Update community files (# 14154) > 2a17873 Separate Activator SA (# 14133) > fc166ac Consolidate webhooks (# 14082) > b935bea Set QP resource defaults (# 14039) > 529c5e4 Update net-kourier nightly (# 14150) > 4ccd1c9 Implement Stringer for nil podTracker (# 14147) > bd3e5e3 upgrade to latest dependencies (# 14151) > ebbca26 upgrade to latest dependencies (# 14149) > bde2f42 Update net-gateway-api nightly (# 14144) > bb1262e Update net-kourier nightly (# 14129) > 32ec382 Drop unused ytt patch for Ingress ServiceType (# 14143) > 4c3b36c Update net-gateway-api nightly (# 14136) > 9a75a93 Update net-istio nightly (# 14132) > ca618b7 Update net-certmanager nightly (# 14131) > ea3e9c3 Update net-contour nightly (# 14130) > 2e7d6e4 Update community files (# 14128) > 63fa389 Allow to set QP resources per service (# 14038) > 9310e4d Update net-kourier nightly (# 14125) bumping knative.dev/eventing 8f74094...de75496: > de75496 Function CopySecretWithName for creating secrets with specific name (# 7002) > 6833ee6 Convert tls secret names to constants (# 7086) > 90721ab [main] Update community files (# 7088) > 4541f4f [main] Update community files (# 7087) > ed05a35 Revert "Add loopclosure linter" (# 7083) > 838274e [main] Upgrade to latest dependencies (# 7078) > a4f0c10 [main] Update community files (# 7085) > afcf60b Move ingress & filter TLS secret names into constants (# 7081) > 1e96c78 feat!: Add tls support for ingress (# 6986) > 6a0495c Add loopclosure linter (# 7079) > 2fe1db6 Updated mtping TLS cert test to bind to free port (# 7036) > 516a915 Upgrade rekt to latest (# 7076) > 6a890e0 Fix flaky unit tests (# 7080) > eaf28a7 Add tracing for TestBrokerWithManyTriggers (# 7077) > f5b1b12 Send namespace header in MT components (# 7048) > 4b5fde8 [main] Update community files (# 7043) bumping knative.dev/hack d7586a2...ddae802: > ddae802 Update community files (# 302) > 8852371 Update community files (# 301) > 12cd6a1 Update community files (# 300) > cc92cdb Replace test-infra with toolbox (# 297) > fc42790 Update community files (# 296) bumping knative.dev/networking 3a75df5...a3fa3a5: > a3fa3a5 Update community files (# 826) > ad60eaa Update community files (# 825) > 03a1f22 upgrade to latest dependencies (# 824) > 2444385 upgrade to latest dependencies (# 822) > b2cce92 Update community files (# 823) > 1431d70 Bump google.golang.org/grpc to the latest version (# 821) > 91821ae Update community files (# 819) Signed-off-by: Knative Automation --- go.mod | 12 ++--- go.sum | 26 +++++------ vendor/knative.dev/hack/library.sh | 6 +-- vendor/knative.dev/hack/presubmit-tests.sh | 2 +- .../serving/pkg/apis/config/features.go | 3 ++ .../serving/pkg/apis/serving/register.go | 37 +++++++++++++++ .../apis/serving/v1/revision_validation.go | 45 ++++++++++++++----- vendor/knative.dev/serving/test/cleanup.go | 8 ++-- vendor/knative.dev/serving/test/e2e-common.sh | 2 +- vendor/modules.txt | 12 ++--- 10 files changed, 107 insertions(+), 46 deletions(-) diff --git a/go.mod b/go.mod index fbe1736a5..43fe39106 100644 --- a/go.mod +++ b/go.mod @@ -20,12 +20,12 @@ require ( k8s.io/cli-runtime v0.25.2 k8s.io/client-go v0.26.5 k8s.io/code-generator v0.26.5 - knative.dev/client-pkg v0.0.0-20230628110147-f377f0665eed - knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808 - knative.dev/hack v0.0.0-20230615155948-d7586a218601 - knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d - knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 - knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994 + knative.dev/client-pkg v0.0.0-20230712132715-e9d838e71fa4 + knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd + knative.dev/hack v0.0.0-20230712131415-ddae80293c43 + knative.dev/networking v0.0.0-20230712132514-a3fa3a5f3624 + knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4 + knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index dc02095be..8338d34eb 100644 --- a/go.sum +++ b/go.sum @@ -391,7 +391,7 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -899,18 +899,18 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/client-pkg v0.0.0-20230628110147-f377f0665eed h1:CheuTeHCohcYUnDIJzQw8Zeg8lFH0tVHvOx/ulv65ZQ= -knative.dev/client-pkg v0.0.0-20230628110147-f377f0665eed/go.mod h1:oYnznlTBCj/bVEHo5vUSM/VS3oDFNJKDmH5+k1aC9/8= -knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808 h1:9xzp250Vqqj+3K/306/th9v5u+n1X+cRdNPgD5Ffyn4= -knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808/go.mod h1:MRpJ0pRqodV9mlPvRTLXnUOo0ExPDHyEk04Zxjn3bA0= -knative.dev/hack v0.0.0-20230615155948-d7586a218601 h1:yMe29SMHrAIt3+J+APvf4WVP6cW7ZDtUhh5uxD5ERdA= -knative.dev/hack v0.0.0-20230615155948-d7586a218601/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d h1:jrODmEPU3SYcmaec2pErrcH5AvXVDdK70XJvblTj7RE= -knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d/go.mod h1:/CM22Ocewr85rfI84I+WUMoOVZSczpsif4fScImHdfU= -knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 h1:weQWWxEEbNOPuL4qtGiBZuMSFhcjF/Cu163uktd/xFE= -knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk= -knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994 h1:pGlaiue/Ux4Gzlb2eTIPmQksmmrNv5xeXsg9GRW4mWE= -knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994/go.mod h1:G5sRe4RpjxCaNdRI/EQagvtCioMtjOIdfoboauNMpSk= +knative.dev/client-pkg v0.0.0-20230712132715-e9d838e71fa4 h1:/7F60Oid9+UQIyORKtTphECrU7l1kUL2yQsMJW6/E1Y= +knative.dev/client-pkg v0.0.0-20230712132715-e9d838e71fa4/go.mod h1:oYnznlTBCj/bVEHo5vUSM/VS3oDFNJKDmH5+k1aC9/8= +knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd h1:oy1lvDGcZwHtu1rWcsU/3N4upiix9sznNg0y4wz2qyE= +knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd/go.mod h1:qdgFteB1E2/K0TfweX9zDX3An6PkzsQ/a4xEWkitusk= +knative.dev/hack v0.0.0-20230712131415-ddae80293c43 h1:3SE06uNfSFGm/5XS+0trbyCUpgsOaBeyhPQU8FPNFz8= +knative.dev/hack v0.0.0-20230712131415-ddae80293c43/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/networking v0.0.0-20230712132514-a3fa3a5f3624 h1:jbU4fus3KQnmjs5IdRBDVurxnWWmBH285pQCpE6Fsn4= +knative.dev/networking v0.0.0-20230712132514-a3fa3a5f3624/go.mod h1:B7E9YnbdPCLAHy9aYpBvKkMzddpIQgKTdn2XcoDZAXU= +knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4 h1:oO/BQJpVCFTSTMHF/S6u+nPtIvbHDTsvbPZvdCZAFjs= +knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4/go.mod h1:eXobTqst4aI7CNa6W7sG73VhEsHGWPSrkefeMTb++a0= +knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37 h1:tzEO9XdOvGlPj9jAa61BlSi3Gq7SQ5pVnWWntVv74P4= +knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37/go.mod h1:KzM8JVJDX87Mx4ACwG3R3TypDYiZgz6PZOdnyIcPwi8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/vendor/knative.dev/hack/library.sh b/vendor/knative.dev/hack/library.sh index df9d3f9ad..889de55a5 100644 --- a/vendor/knative.dev/hack/library.sh +++ b/vendor/knative.dev/hack/library.sh @@ -657,7 +657,7 @@ function foreach_go_module() { echo "Command '${cmd}' failed in module $gomod_dir: $failed" >&2 return $failed fi - done < <(go_run knative.dev/test-infra/tools/modscope@latest ls -p) + done < <(go_run knative.dev/toolbox/modscope@latest ls -p) } # Update go deps. @@ -709,7 +709,7 @@ function __go_update_deps_for_module() { else group "Upgrading to release ${RELEASE}" fi - FLOATING_DEPS+=( $(go_run knative.dev/test-infra/buoy@latest float ./go.mod "${buoyArgs[@]}") ) + FLOATING_DEPS+=( $(go_run knative.dev/toolbox/buoy@latest float ./go.mod "${buoyArgs[@]}") ) if [[ ${#FLOATING_DEPS[@]} > 0 ]]; then echo "Floating deps to ${FLOATING_DEPS[@]}" go get -d ${FLOATING_DEPS[@]} @@ -754,7 +754,7 @@ function __go_update_deps_for_module() { # Intended to be used like: # export MODULE_NAME=$(go_mod_module_name) function go_mod_module_name() { - go_run knative.dev/test-infra/tools/modscope@latest current + go_run knative.dev/toolbox/modscope@latest current } # Return a GOPATH to a temp directory. Works around the out-of-GOPATH issues diff --git a/vendor/knative.dev/hack/presubmit-tests.sh b/vendor/knative.dev/hack/presubmit-tests.sh index 1f6f18252..1c6e5a8df 100644 --- a/vendor/knative.dev/hack/presubmit-tests.sh +++ b/vendor/knative.dev/hack/presubmit-tests.sh @@ -139,7 +139,7 @@ function __build_test_runner_for_module() { # Don't merge these two lines, or return code will always be 0. # Get all build tags in go code (ignore /vendor, /hack and /third_party) local tags - tags="$(go run knative.dev/test-infra/tools/go-ls-tags@latest --joiner=,)" + tags="$(go run knative.dev/toolbox/go-ls-tags@latest --joiner=,)" local go_pkg_dirs go_pkg_dirs="$(go list -tags "${tags}" ./...)" || return $? if [[ -z "${go_pkg_dirs}" ]]; then diff --git a/vendor/knative.dev/serving/pkg/apis/config/features.go b/vendor/knative.dev/serving/pkg/apis/config/features.go index 655188ec4..32b7345a8 100644 --- a/vendor/knative.dev/serving/pkg/apis/config/features.go +++ b/vendor/knative.dev/serving/pkg/apis/config/features.go @@ -67,6 +67,7 @@ func defaultFeaturesConfig() *Features { PodSpecPersistentVolumeClaim: Disabled, PodSpecPersistentVolumeWrite: Disabled, QueueProxyMountPodInfo: Disabled, + QueueProxyResourceDefaults: Disabled, PodSpecInitContainers: Disabled, PodSpecDNSPolicy: Disabled, PodSpecDNSConfig: Disabled, @@ -102,6 +103,7 @@ func NewFeaturesConfigFromMap(data map[string]string) (*Features, error) { asFlag("kubernetes.podspec-dnsconfig", &nc.PodSpecDNSConfig), asFlag("secure-pod-defaults", &nc.SecurePodDefaults), asFlag("tag-header-based-routing", &nc.TagHeaderBasedRouting), + asFlag("queueproxy.resource-defaults", &nc.QueueProxyResourceDefaults), asFlag("queueproxy.mount-podinfo", &nc.QueueProxyMountPodInfo), asFlag("autodetect-http2", &nc.AutoDetectHTTP2)); err != nil { return nil, err @@ -134,6 +136,7 @@ type Features struct { PodSpecPersistentVolumeClaim Flag PodSpecPersistentVolumeWrite Flag QueueProxyMountPodInfo Flag + QueueProxyResourceDefaults Flag PodSpecDNSPolicy Flag PodSpecDNSConfig Flag SecurePodDefaults Flag diff --git a/vendor/knative.dev/serving/pkg/apis/serving/register.go b/vendor/knative.dev/serving/pkg/apis/serving/register.go index 51eada3e9..7fc51964f 100644 --- a/vendor/knative.dev/serving/pkg/apis/serving/register.go +++ b/vendor/knative.dev/serving/pkg/apis/serving/register.go @@ -116,8 +116,27 @@ const ( // QueueSidecarResourcePercentageAnnotationKey is the percentage of user container resources to be used for queue-proxy // It has to be in [0.1,100] + // Deprecated: Please consider setting resources explicitly for the QP per service, see `QueueSidecarCPUResourceRequestAnnotationKey` for example. QueueSidecarResourcePercentageAnnotationKey = "queue.sidecar." + GroupName + "/resource-percentage" + // QueueSidecarCPUResourceRequestAnnotationKey is the explicit value of the cpu request for queue-proxy's request resources + QueueSidecarCPUResourceRequestAnnotationKey = "queue.sidecar." + GroupName + "/cpu-resource-request" + + // QueueSidecarCPUResourceLimitAnnotationKey is the explicit value of the cpu limit for queue-proxy's limit resources + QueueSidecarCPUResourceLimitAnnotationKey = "queue.sidecar." + GroupName + "/cpu-resource-limit" + + // QueueSidecarMemoryResourceRequestAnnotationKey is the explicit value of the memory request for queue-proxy's request resources + QueueSidecarMemoryResourceRequestAnnotationKey = "queue.sidecar." + GroupName + "/memory-resource-request" + + // QueueSidecarMemoryResourceLimitAnnotationKey is the explicit value of the memory limit for queue-proxy's limit resources + QueueSidecarMemoryResourceLimitAnnotationKey = "queue.sidecar." + GroupName + "/memory-resource-limit" + + // QueueSidecarEphemeralStorageResourceRequestAnnotationKey is the explicit value of the ephemeral storage request for queue-proxy's request resources + QueueSidecarEphemeralStorageResourceRequestAnnotationKey = "queue.sidecar." + GroupName + "/ephemeral-storage-resource-request" + + // QueueSidecarEphemeralStorageResourceLimitAnnotationKey is the explicit value of the ephemeral storage limit for queue-proxy's limit resources + QueueSidecarEphemeralStorageResourceLimitAnnotationKey = "queue.sidecar." + GroupName + "/ephemeral-storage-resource-limit" + // VisibilityClusterLocal is the label value for VisibilityLabelKey // that will result to the Route/KService getting a cluster local // domain suffix. @@ -162,6 +181,24 @@ var ( QueueSidecarResourcePercentageAnnotationKey, "queue.sidecar." + GroupName + "/resourcePercentage", } + QueueSidecarCPUResourceRequestAnnotation = kmap.KeyPriority{ + QueueSidecarCPUResourceRequestAnnotationKey, + } + QueueSidecarCPUResourceLimitAnnotation = kmap.KeyPriority{ + QueueSidecarCPUResourceLimitAnnotationKey, + } + QueueSidecarMemoryResourceRequestAnnotation = kmap.KeyPriority{ + QueueSidecarMemoryResourceRequestAnnotationKey, + } + QueueSidecarMemoryResourceLimitAnnotation = kmap.KeyPriority{ + QueueSidecarMemoryResourceLimitAnnotationKey, + } + QueueSidecarEphemeralStorageResourceRequestAnnotation = kmap.KeyPriority{ + QueueSidecarEphemeralStorageResourceRequestAnnotationKey, + } + QueueSidecarEphemeralStorageResourceLimitAnnotation = kmap.KeyPriority{ + QueueSidecarEphemeralStorageResourceLimitAnnotationKey, + } ProgressDeadlineAnnotation = kmap.KeyPriority{ ProgressDeadlineAnnotationKey, } diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go index 9351f91f1..2508bf8bb 100644 --- a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go +++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_validation.go @@ -23,8 +23,10 @@ import ( "strings" "time" + "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/api/validation" "knative.dev/pkg/apis" + "knative.dev/pkg/kmap" "knative.dev/pkg/kmp" "knative.dev/serving/pkg/apis/autoscaling" "knative.dev/serving/pkg/apis/config" @@ -68,7 +70,7 @@ func (rts *RevisionTemplateSpec) Validate(ctx context.Context) *apis.FieldError // If the RevisionTemplateSpec has a name specified, then check that // it follows the requirements on the name. errs = errs.Also(validateRevisionName(ctx, rts.Name, rts.GenerateName)) - errs = errs.Also(validateQueueSidecarAnnotation(rts.Annotations).ViaField("metadata.annotations")) + errs = errs.Also(validateQueueSidecarResourceAnnotations(rts.Annotations).ViaField("metadata.annotations")) errs = errs.Also(validateProgressDeadlineAnnotation(rts.Annotations).ViaField("metadata.annotations")) return errs } @@ -179,23 +181,42 @@ func validateTimeoutSeconds(ctx context.Context, timeoutSeconds int64) *apis.Fie return nil } -// validateQueueSidecarAnnotation validates QueueSideCarResourcePercentageAnnotation -func validateQueueSidecarAnnotation(m map[string]string) *apis.FieldError { +// validateQueueSidecarResourceAnnotations validates QueueSideCarResourcePercentageAnnotation and other QP resource related annotations. +func validateQueueSidecarResourceAnnotations(m map[string]string) *apis.FieldError { if len(m) == 0 { return nil } - k, v, ok := serving.QueueSidecarResourcePercentageAnnotation.Get(m) - if !ok { - return nil + + var errs *apis.FieldError + if k, v, ok := serving.QueueSidecarResourcePercentageAnnotation.Get(m); ok { + errs = apis.ErrGeneric("Queue proxy resource percentage annotation is deprecated. Please use the available annotations to explicitly set resource values per service").ViaKey(k).At(apis.WarningLevel) + value, err := strconv.ParseFloat(v, 64) + if err != nil { + errs = errs.Also(apis.ErrInvalidValue(v, apis.CurrentField).ViaKey(k)) + } else { + if value < 0.1 || value > 100 { + errs = errs.Also(apis.ErrOutOfBoundsValue(value, 0.1, 100.0, apis.CurrentField).ViaKey(k)) + } + } } - value, err := strconv.ParseFloat(v, 64) - if err != nil { - return apis.ErrInvalidValue(v, apis.CurrentField).ViaKey(k) + annoKeys := []kmap.KeyPriority{ + serving.QueueSidecarCPUResourceRequestAnnotation, + serving.QueueSidecarCPUResourceLimitAnnotation, + serving.QueueSidecarMemoryResourceRequestAnnotation, + serving.QueueSidecarMemoryResourceLimitAnnotation, + serving.QueueSidecarEphemeralStorageResourceRequestAnnotation, + serving.QueueSidecarEphemeralStorageResourceLimitAnnotation, } - if value < 0.1 || value > 100 { - return apis.ErrOutOfBoundsValue(value, 0.1, 100.0, apis.CurrentField).ViaKey(k) + for _, resAnno := range annoKeys { + k, v, ok := resAnno.Get(m) + if !ok { + continue + } + if _, err := resource.ParseQuantity(v); err != nil { + errs = errs.Also(apis.ErrInvalidValue(v, apis.CurrentField).ViaKey(k)) + } } - return nil + return errs } // ValidateProgressDeadlineAnnotation validates the revision progress deadline annotation. diff --git a/vendor/knative.dev/serving/test/cleanup.go b/vendor/knative.dev/serving/test/cleanup.go index b24a18322..980463b08 100644 --- a/vendor/knative.dev/serving/test/cleanup.go +++ b/vendor/knative.dev/serving/test/cleanup.go @@ -73,6 +73,10 @@ func TearDown(clients *Clients, names *ResourceNames) { // EnsureCleanup will run the provided cleanup function when the test ends, // either via t.Cleanup or on interrupt via CleanupOnInterrupt. func EnsureCleanup(t *testing.T, cleanup func()) { + if ServingFlags.SkipCleanupOnFail { + t.Log("skipping cleanup") + return + } t.Cleanup(cleanup) CleanupOnInterrupt(cleanup) } @@ -81,10 +85,6 @@ func EnsureCleanup(t *testing.T, cleanup func()) { // t.Cleanup, or on interrupt via CleanupOnInterrupt. func EnsureTearDown(t *testing.T, clients *Clients, names *ResourceNames) { EnsureCleanup(t, func() { - if ServingFlags.SkipCleanupOnFail { - t.Log("skipping cleanup") - return - } TearDown(clients, names) }) } diff --git a/vendor/knative.dev/serving/test/e2e-common.sh b/vendor/knative.dev/serving/test/e2e-common.sh index dc0e96f37..93c7e90bf 100644 --- a/vendor/knative.dev/serving/test/e2e-common.sh +++ b/vendor/knative.dev/serving/test/e2e-common.sh @@ -294,6 +294,7 @@ function install() { fi YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/ingress/${ingress}") + YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/certmanager/kapp-order.yaml") YTT_FILES+=("${REPO_ROOT_DIR}/third_party/cert-manager-${CERT_MANAGER_VERSION}/cert-manager.yaml") YTT_FILES+=("${REPO_ROOT_DIR}/third_party/cert-manager-${CERT_MANAGER_VERSION}/net-certmanager.yaml") @@ -312,7 +313,6 @@ function install() { if (( KIND )); then YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/kind/core") - YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/kind/ingress/${ingress}-kind.yaml") fi if (( PVC )); then diff --git a/vendor/modules.txt b/vendor/modules.txt index a755d3cdc..0ff720036 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -938,10 +938,10 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/client-pkg v0.0.0-20230628110147-f377f0665eed +# knative.dev/client-pkg v0.0.0-20230712132715-e9d838e71fa4 ## explicit; go 1.18 knative.dev/client-pkg/pkg/kn/plugin -# knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808 +# knative.dev/eventing v0.37.1-0.20230717151218-de75496e18fd ## explicit; go 1.19 knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/duck @@ -970,10 +970,10 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake -# knative.dev/hack v0.0.0-20230615155948-d7586a218601 +# knative.dev/hack v0.0.0-20230712131415-ddae80293c43 ## explicit; go 1.18 knative.dev/hack -# knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d +# knative.dev/networking v0.0.0-20230712132514-a3fa3a5f3624 ## explicit; go 1.18 knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking @@ -988,7 +988,7 @@ knative.dev/networking/pkg/http/probe knative.dev/networking/pkg/http/proxy knative.dev/networking/pkg/http/stats knative.dev/networking/pkg/k8s -# knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 +# knative.dev/pkg v0.0.0-20230712131115-7051d301e7f4 ## explicit; go 1.18 knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -1038,7 +1038,7 @@ knative.dev/pkg/tracing/config knative.dev/pkg/tracing/propagation knative.dev/pkg/tracing/propagation/tracecontextb3 knative.dev/pkg/tracker -# knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994 +# knative.dev/serving v0.37.1-0.20230713131514-294cb9c08b37 ## explicit; go 1.18 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1