From 6e03c0ef1f0fd2f2baac2e0fe650bca59e0399fc Mon Sep 17 00:00:00 2001 From: "Matt Moore (via sockpuppet)" Date: Mon, 9 Mar 2020 17:52:00 +0000 Subject: [PATCH] Auto-update dependencies Produced via: `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh` /assign maximilien rhuss /cc maximilien rhuss --- go.mod | 6 +- go.sum | 12 ++-- .../serving/pkg/apis/config/defaults.go | 59 ++++++++++++------- .../scripts/markdown-link-check-config.rc | 4 +- vendor/modules.txt | 6 +- 5 files changed, 52 insertions(+), 35 deletions(-) diff --git a/go.mod b/go.mod index b165d83f66..cb33ff8772 100644 --- a/go.mod +++ b/go.mod @@ -21,9 +21,9 @@ require ( k8s.io/cli-runtime v0.17.0 k8s.io/client-go v0.17.0 knative.dev/eventing v0.13.1 - knative.dev/pkg v0.0.0-20200304185554-312b1be35ceb - knative.dev/serving v0.13.0 - knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d + knative.dev/pkg v0.0.0-20200309165928-1327ff317946 + knative.dev/serving v0.13.1-0.20200309164530-f5ef18095760 + knative.dev/test-infra v0.0.0-20200309034928-49c52045657f sigs.k8s.io/yaml v1.1.0 ) diff --git a/go.sum b/go.sum index 8354f028e0..00cb3c93be 100644 --- a/go.sum +++ b/go.sum @@ -594,12 +594,12 @@ k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCui k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= knative.dev/eventing v0.13.1 h1:2jnxea7XtqFX8dMFu9cZ7ocMuQV5ZnXX+6tLF6AbYGo= knative.dev/eventing v0.13.1/go.mod h1:UxweNv8yXhsdHJitcb9R6rmfNaUD2DFi9GWwNRyIs58= -knative.dev/pkg v0.0.0-20200304185554-312b1be35ceb h1:cgpFaVF0jb7z+zJGzq30HMfxMmWwX5WEnkMZ9EHli7I= -knative.dev/pkg v0.0.0-20200304185554-312b1be35ceb/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= -knative.dev/serving v0.13.0 h1:HkkTVBi6EWoFJcgjXgAVUFdKdxZRulb38dnfnkBYCrQ= -knative.dev/serving v0.13.0/go.mod h1:x2n255JS2XBI39tmjZ8CwTxIf9EKNMCrkVuiOttLRm0= -knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d h1:YlscBzPOL3Rfyl8844/wHhJNL5uiHDdyaRn6IEVvv64= -knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= +knative.dev/pkg v0.0.0-20200309165928-1327ff317946 h1:XtvVj0t6cpHQNerD/ZYg82aYlkKiU49TQ8gk9bvBzQI= +knative.dev/pkg v0.0.0-20200309165928-1327ff317946/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= +knative.dev/serving v0.13.1-0.20200309164530-f5ef18095760 h1:wUyi2ZwHNDbng7cgj7cpny1OeJLSkaN4GOZYE+k77Rc= +knative.dev/serving v0.13.1-0.20200309164530-f5ef18095760/go.mod h1:x2n255JS2XBI39tmjZ8CwTxIf9EKNMCrkVuiOttLRm0= +knative.dev/test-infra v0.0.0-20200309034928-49c52045657f h1:7QZzwWRnQy14u8zNu/WFpLTeGuoBLvbiT4LqY6cM7dQ= +knative.dev/test-infra v0.0.0-20200309034928-49c52045657f/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= diff --git a/vendor/knative.dev/serving/pkg/apis/config/defaults.go b/vendor/knative.dev/serving/pkg/apis/config/defaults.go index fe1820dec3..ea4d47e130 100644 --- a/vendor/knative.dev/serving/pkg/apis/config/defaults.go +++ b/vendor/knative.dev/serving/pkg/apis/config/defaults.go @@ -21,6 +21,7 @@ import ( "context" "fmt" "io/ioutil" + "math" "strconv" "text/template" @@ -53,44 +54,56 @@ const ( DefaultMaxRevisionContainerConcurrency int64 = 1000 ) +func defaultConfig() *Defaults { + return &Defaults{ + RevisionTimeoutSeconds: DefaultRevisionTimeoutSeconds, + MaxRevisionTimeoutSeconds: DefaultMaxRevisionTimeoutSeconds, + UserContainerNameTemplate: DefaultUserContainerName, + ContainerConcurrency: DefaultContainerConcurrency, + ContainerConcurrencyMaxLimit: DefaultMaxRevisionContainerConcurrency, + } +} + // NewDefaultsConfigFromMap creates a Defaults from the supplied Map func NewDefaultsConfigFromMap(data map[string]string) (*Defaults, error) { - nc := &Defaults{} + nc := defaultConfig() // Process int64 fields for _, i64 := range []struct { key string field *int64 - // specified exactly when optional - defaultValue int64 }{{ - key: "revision-timeout-seconds", - field: &nc.RevisionTimeoutSeconds, - defaultValue: DefaultRevisionTimeoutSeconds, + key: "revision-timeout-seconds", + field: &nc.RevisionTimeoutSeconds, }, { - key: "max-revision-timeout-seconds", - field: &nc.MaxRevisionTimeoutSeconds, - defaultValue: DefaultMaxRevisionTimeoutSeconds, + key: "max-revision-timeout-seconds", + field: &nc.MaxRevisionTimeoutSeconds, }, { - key: "container-concurrency", - field: &nc.ContainerConcurrency, - defaultValue: DefaultContainerConcurrency, + key: "container-concurrency", + field: &nc.ContainerConcurrency, + }, { + key: "container-concurrency-max-limit", + field: &nc.ContainerConcurrencyMaxLimit, }} { - if raw, ok := data[i64.key]; !ok { - *i64.field = i64.defaultValue - } else if val, err := strconv.ParseInt(raw, 10, 64); err != nil { - return nil, err - } else { - *i64.field = val + if raw, ok := data[i64.key]; ok { + if val, err := strconv.ParseInt(raw, 10, 64); err != nil { + return nil, err + } else { + *i64.field = val + } } } if nc.RevisionTimeoutSeconds > nc.MaxRevisionTimeoutSeconds { return nil, fmt.Errorf("revision-timeout-seconds (%d) cannot be greater than max-revision-timeout-seconds (%d)", nc.RevisionTimeoutSeconds, nc.MaxRevisionTimeoutSeconds) } - - if nc.ContainerConcurrency < 0 || nc.ContainerConcurrency > DefaultMaxRevisionContainerConcurrency { - return nil, apis.ErrOutOfBoundsValue(nc.ContainerConcurrency, 0, DefaultMaxRevisionContainerConcurrency, "containerConcurrency") + if nc.ContainerConcurrencyMaxLimit < 1 { + return nil, apis.ErrOutOfBoundsValue( + nc.ContainerConcurrencyMaxLimit, 1, math.MaxInt32, "container-concurrency-max-limit") + } + if nc.ContainerConcurrency < 0 || nc.ContainerConcurrency > nc.ContainerConcurrencyMaxLimit { + return nil, apis.ErrOutOfBoundsValue( + nc.ContainerConcurrency, 0, nc.ContainerConcurrencyMaxLimit, "container-concurrency") } // Process resource quantity fields @@ -154,6 +167,10 @@ type Defaults struct { ContainerConcurrency int64 + // ContainerConcurrencyMaxLimit is the maximum permitted container concurrency + // or target value in the system. + ContainerConcurrencyMaxLimit int64 + RevisionCPURequest *resource.Quantity RevisionCPULimit *resource.Quantity RevisionMemoryRequest *resource.Quantity diff --git a/vendor/knative.dev/test-infra/scripts/markdown-link-check-config.rc b/vendor/knative.dev/test-infra/scripts/markdown-link-check-config.rc index 9d802a0d48..49b042e827 100644 --- a/vendor/knative.dev/test-infra/scripts/markdown-link-check-config.rc +++ b/vendor/knative.dev/test-infra/scripts/markdown-link-check-config.rc @@ -1,5 +1,5 @@ # For help, see # https://github.com/raviqqe/liche/blob/master/README.md -# Don't check localhost links --x "^https?://localhost($|[:/].*)" +# Don't check localhost links and don't check templated links +-x "(^https?://localhost($|[:/].*))|(^https://.*{{.*$)" diff --git a/vendor/modules.txt b/vendor/modules.txt index d47c3a756b..3a877d3ed1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -496,7 +496,7 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake knative.dev/eventing/pkg/legacyclient/clientset/versioned/scheme knative.dev/eventing/pkg/legacyclient/clientset/versioned/typed/legacysources/v1alpha1 knative.dev/eventing/pkg/logging -# knative.dev/pkg v0.0.0-20200304185554-312b1be35ceb +# knative.dev/pkg v0.0.0-20200309165928-1327ff317946 knative.dev/pkg/apis knative.dev/pkg/apis/duck knative.dev/pkg/apis/duck/v1 @@ -512,7 +512,7 @@ knative.dev/pkg/logging/logkey knative.dev/pkg/profiling knative.dev/pkg/ptr knative.dev/pkg/tracker -# knative.dev/serving v0.13.0 +# knative.dev/serving v0.13.1-0.20200309164530-f5ef18095760 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1 knative.dev/serving/pkg/apis/config @@ -526,7 +526,7 @@ knative.dev/serving/pkg/autoscaler/config knative.dev/serving/pkg/client/clientset/versioned/scheme knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1 knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake -# knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d +# knative.dev/test-infra v0.0.0-20200309034928-49c52045657f knative.dev/test-infra/scripts # sigs.k8s.io/kustomize v2.0.3+incompatible sigs.k8s.io/kustomize/pkg/commands/build