Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
Update dependencies via './hack/update-deps.sh --upgrade && ./hack/up…
Browse files Browse the repository at this point in the history
…date-codegen.sh' (#1578)

Signed-off-by: Matthias Wessendorf <[email protected]>
  • Loading branch information
matzew authored Sep 16, 2020
1 parent b92faaf commit 112d921
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 20 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ require (
k8s.io/apimachinery v0.18.8
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451
knative.dev/eventing v0.17.1-0.20200915100349-3012623eeb91
knative.dev/pkg v0.0.0-20200915092441-a5e2edc217c0
knative.dev/serving v0.17.1-0.20200915135741-9a5b034fc680
knative.dev/test-infra v0.0.0-20200914203402-489e9e80675b
knative.dev/eventing v0.17.1-0.20200915215041-aa296384e4a2
knative.dev/pkg v0.0.0-20200915170341-1d4e654a38f0
knative.dev/serving v0.17.1-0.20200916102941-af13fb68dba4
knative.dev/test-infra v0.0.0-20200916050341-8088f305e08c
)

replace (
Expand Down
17 changes: 10 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1993,14 +1993,14 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/caching v0.0.0-20200914162003-11799af7d86b/go.mod h1:P5WXVMZ8HDtt1mTmtlT8/tULj/v4JPZGaz7v5PKl7vc=
knative.dev/eventing v0.17.1-0.20200915100349-3012623eeb91 h1:YAfGejf/uW0xr1+aV+6k6BMY2TJ6ljbtpQn9/kXZe+I=
knative.dev/eventing v0.17.1-0.20200915100349-3012623eeb91/go.mod h1:Xbh3tPsCNXXHS3G0+OeSPduhEC7B1eCfMziB29TmUms=
knative.dev/eventing v0.17.1-0.20200915215041-aa296384e4a2 h1:D7gqcUn/MI+J2Cr03Hh2UyczVRRnaqv0GhyWM5Kkaqg=
knative.dev/eventing v0.17.1-0.20200915215041-aa296384e4a2/go.mod h1:D6q7wA33iRBz2hwTYiURGFQoWXSoJ+TQpq/0bDuCgTA=
knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/networking v0.0.0-20200914152802-611f989aa593 h1:zw6CFtOkqaDa5Zs0bd9wF6Urvi+rNQ0DtF3X52UP1+I=
knative.dev/networking v0.0.0-20200914152802-611f989aa593/go.mod h1:ij9CEKPBysEYLvCI0Uaaiajz7L52Fq63s2ZrFszyqE8=
knative.dev/networking v0.0.0-20200915161842-348082e83e8a h1:2wcdBDubG3gQ36T8Q34F01iT1QYNc6Mjl6vLs+2d0Ws=
knative.dev/networking v0.0.0-20200915161842-348082e83e8a/go.mod h1:ij9CEKPBysEYLvCI0Uaaiajz7L52Fq63s2ZrFszyqE8=
knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20191111150521-6d806b998379/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
Expand All @@ -2012,11 +2012,12 @@ knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9
knative.dev/pkg v0.0.0-20200911145400-2d4efecc6bc1 h1:YO9A5F0xo6sTeJZyrV9/IIeVNfKqNz9udsWsofe9eQk=
knative.dev/pkg v0.0.0-20200911145400-2d4efecc6bc1/go.mod h1:igZfLQk2QpRo+cxbH4NfsgbdavqsXr1rMr818/xVu3c=
knative.dev/pkg v0.0.0-20200914134901-948ac9f2ce99/go.mod h1:igZfLQk2QpRo+cxbH4NfsgbdavqsXr1rMr818/xVu3c=
knative.dev/pkg v0.0.0-20200915011641-2e7d80578f25/go.mod h1:igZfLQk2QpRo+cxbH4NfsgbdavqsXr1rMr818/xVu3c=
knative.dev/pkg v0.0.0-20200915092441-a5e2edc217c0 h1:9ETJvpaWmhEcTG/wx2syd6FbJpD2u/PGabD1CcYLf9M=
knative.dev/pkg v0.0.0-20200915092441-a5e2edc217c0/go.mod h1:ZV1kWD8UMvELVVDld0PDRdjwdCsGwEwf1YUvGGDUl2c=
knative.dev/serving v0.17.1-0.20200915135741-9a5b034fc680 h1:noBAOd7i671zuBqpIjrV8cbO9WD2sEpKYNY6OaioqPA=
knative.dev/serving v0.17.1-0.20200915135741-9a5b034fc680/go.mod h1:+B3Vy0IrPUM7Be3G5m1BYX5GVU4ueFuuqaZEaAvhHOk=
knative.dev/pkg v0.0.0-20200915170341-1d4e654a38f0 h1:jqTjEd3FT5FSBPKmAAvErzhUf7CzdSDSsIicLGNEVGg=
knative.dev/pkg v0.0.0-20200915170341-1d4e654a38f0/go.mod h1:ZV1kWD8UMvELVVDld0PDRdjwdCsGwEwf1YUvGGDUl2c=
knative.dev/serving v0.17.1-0.20200916102941-af13fb68dba4 h1:BTbKTgpW1CUVrTA2Lu8SE7JM+Mf/o9saxvpJojwZ3ww=
knative.dev/serving v0.17.1-0.20200916102941-af13fb68dba4/go.mod h1:H5jogVZZIWXh7erTTglwuDlrPEJNAWphtxgWxoXl1LM=
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
Expand All @@ -2029,6 +2030,8 @@ knative.dev/test-infra v0.0.0-20200910231400-cfba2288403d/go.mod h1:Pmg2c7Z7q7BG
knative.dev/test-infra v0.0.0-20200911201000-3f90e7c8f2fa/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
knative.dev/test-infra v0.0.0-20200914203402-489e9e80675b h1:nA50WBTXgAcXmhb8iuupWJ1At8Ga1q9phE8juNc0wmI=
knative.dev/test-infra v0.0.0-20200914203402-489e9e80675b/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
knative.dev/test-infra v0.0.0-20200916050341-8088f305e08c h1:jGCfsBN8P6i/zaCd75cZMkybRqhq1X+uH0ZTEt0bRKQ=
knative.dev/test-infra v0.0.0-20200916050341-8088f305e08c/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
Expand Down
1 change: 1 addition & 0 deletions vendor/knative.dev/eventing/pkg/adapter/v2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"knative.dev/eventing/pkg/leaderelection"
)

// Adapter is the interface receive adapters are expected to implement
type Adapter interface {
Start(ctx context.Context) error
}
Expand Down
20 changes: 19 additions & 1 deletion vendor/knative.dev/serving/pkg/apis/serving/fieldmask.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func VolumeProjectionMask(in *corev1.VolumeProjection) *corev1.VolumeProjection
// Allowed fields
out.Secret = in.Secret
out.ConfigMap = in.ConfigMap
out.ServiceAccountToken = in.ServiceAccountToken

// Disallowed fields
// This list is unnecessary, but added here for clarity
out.DownwardAPI = nil
out.ServiceAccountToken = nil

return out
}
Expand Down Expand Up @@ -118,6 +118,24 @@ func SecretProjectionMask(in *corev1.SecretProjection) *corev1.SecretProjection
return out
}

// ServiceAccountTokenProjectionMask performs a _shallow_ copy of the Kubernetes ServiceAccountTokenProjection
// object to a new Kubernetes ServiceAccountTokenProjection object bringing over only the fields allowed
// in the Knative API. This does not validate the contents or the bounds of the provided fields.
func ServiceAccountTokenProjectionMask(in *corev1.ServiceAccountTokenProjection) *corev1.ServiceAccountTokenProjection {
if in == nil {
return nil
}

out := &corev1.ServiceAccountTokenProjection{
// Allowed fields
Audience: in.Audience,
ExpirationSeconds: in.ExpirationSeconds,
Path: in.Path,
}

return out
}

// KeyToPathMask performs a _shallow_ copy of the Kubernetes KeyToPath
// object to a new Kubernetes KeyToPath object bringing over only the fields allowed
// in the Knative API. This does not validate the contents or the bounds of the provided fields.
Expand Down
15 changes: 14 additions & 1 deletion vendor/knative.dev/serving/pkg/apis/serving/k8s_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,12 @@ func validateProjectedVolumeSource(vp corev1.VolumeProjection) *apis.FieldError
specified = append(specified, "configMap")
errs = errs.Also(validateConfigMapProjection(vp.ConfigMap).ViaField("configMap"))
}
if vp.ServiceAccountToken != nil {
specified = append(specified, "serviceAccountToken")
errs = errs.Also(validateServiceAccountTokenProjection(vp.ServiceAccountToken).ViaField("serviceAccountToken"))
}
if len(specified) == 0 {
errs = errs.Also(apis.ErrMissingOneOf("secret", "configMap"))
errs = errs.Also(apis.ErrMissingOneOf("secret", "configMap", "serviceAccountToken"))
} else if len(specified) > 1 {
errs = errs.Also(apis.ErrMultipleOneOf(specified...))
}
Expand Down Expand Up @@ -186,6 +190,15 @@ func validateSecretProjection(sp *corev1.SecretProjection) *apis.FieldError {
return errs
}

func validateServiceAccountTokenProjection(sp *corev1.ServiceAccountTokenProjection) *apis.FieldError {
errs := apis.CheckDisallowedFields(*sp, *ServiceAccountTokenProjectionMask(sp))
// Audience & ExpirationSeconds are optional
if sp.Path == "" {
errs = errs.Also(apis.ErrMissingField("path"))
}
return errs
}

func validateKeyToPath(k2p corev1.KeyToPath) *apis.FieldError {
errs := apis.CheckDisallowedFields(k2p, *KeyToPathMask(&k2p))
if k2p.Key == "" {
Expand Down
14 changes: 12 additions & 2 deletions vendor/knative.dev/serving/pkg/autoscaler/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ type Config struct {
// autoscaling.knative.dev/maxScale annotation
MaxScale int32

// MaxMaxScale is the maximum allowed MaxScale and `autoscaling.knative.dev/maxScale`
// annotation value for a revision.
MaxMaxScale int32

// General autoscaler algorithm configuration.
MaxScaleUpRate float64
MaxScaleDownRate float64
Expand Down Expand Up @@ -125,6 +129,7 @@ func defaultConfig() *Config {
AllowZeroInitialScale: false,
InitialScale: 1,
MaxScale: 0,
MaxMaxScale: 0,
}
}

Expand All @@ -150,6 +155,7 @@ func NewConfigFromMap(data map[string]string) (*Config, error) {

cm.AsInt32("initial-scale", &lc.InitialScale),
cm.AsInt32("max-scale", &lc.MaxScale),
cm.AsInt32("max-max-scale", &lc.MaxMaxScale),

cm.AsDuration("stable-window", &lc.StableWindow),
cm.AsDuration("scale-down-delay", &lc.ScaleDownDelay),
Expand Down Expand Up @@ -238,8 +244,12 @@ func validate(lc *Config) (*Config, error) {
return nil, fmt.Errorf("initial-scale = %v, must be at least 0 (or at least 1 when allow-zero-initial-scale is false)", lc.InitialScale)
}

if lc.MaxScale < 0 {
return nil, fmt.Errorf("max-scale = %v, must be at least 0", lc.MaxScale)
if lc.MaxScale < 0 || (lc.MaxMaxScale > 0 && lc.MaxScale > lc.MaxMaxScale) {
return nil, fmt.Errorf("max-scale = %v, must be in [0, max-max-scale] range", lc.MaxScale)
}

if lc.MaxMaxScale < 0 {
return nil, fmt.Errorf("max-max-scale = %v, must be at least 0", lc.MaxMaxScale)
}
return lc, nil
}
Expand Down
10 changes: 5 additions & 5 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.17.1-0.20200915100349-3012623eeb91
# knative.dev/eventing v0.17.1-0.20200915215041-aa296384e4a2
## explicit
knative.dev/eventing/pkg/adapter/v2
knative.dev/eventing/pkg/adapter/v2/test
Expand Down Expand Up @@ -1228,11 +1228,11 @@ knative.dev/eventing/test/test_images/print
knative.dev/eventing/test/test_images/recordevents
knative.dev/eventing/test/test_images/sequencestepper
knative.dev/eventing/test/test_images/transformevents
# knative.dev/networking v0.0.0-20200914152802-611f989aa593
# knative.dev/networking v0.0.0-20200915161842-348082e83e8a
knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1
# knative.dev/pkg v0.0.0-20200915092441-a5e2edc217c0
# knative.dev/pkg v0.0.0-20200915170341-1d4e654a38f0
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down Expand Up @@ -1326,7 +1326,7 @@ knative.dev/pkg/webhook/resourcesemantics
knative.dev/pkg/webhook/resourcesemantics/conversion
knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
# knative.dev/serving v0.17.1-0.20200915135741-9a5b034fc680
# knative.dev/serving v0.17.1-0.20200916102941-af13fb68dba4
## explicit
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down Expand Up @@ -1357,7 +1357,7 @@ knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1
knative.dev/serving/pkg/client/listers/serving/v1
knative.dev/serving/pkg/client/listers/serving/v1alpha1
knative.dev/serving/pkg/client/listers/serving/v1beta1
# knative.dev/test-infra v0.0.0-20200914203402-489e9e80675b
# knative.dev/test-infra v0.0.0-20200916050341-8088f305e08c
## explicit
knative.dev/test-infra/scripts
# sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba
Expand Down

0 comments on commit 112d921

Please sign in to comment.