mirror of https://github.com/knative/client.git
upgrade to latest dependencies (#1470)
bumping knative.dev/pkg 2267a4c...a00ba48:
> a00ba48 Add unit test coverage of cluster-scoped tracker. (# 2306)
> 11a3414 Provide the webhook infrastructure with the raw request context. (# 2305)
> b4b8bca Allow tracking Cluster-scoped resources. (# 2304)
> 74ac82a Check Knative CustomResourceDefinitions stored version (# 2272)
bumping knative.dev/eventing 2e917e1...8274c41:
> 8274c41 Adding finalizers/status subresources to NOOP migrator (# 5786)
> a6f2a70 💄 go with a more minimal set of permissions (# 5784)
> 2c059b2 Validate DeliverySpec in Channels & Subscriptions (# 5777)
bumping knative.dev/serving b2c0104...365f68b:
> 365f68b set the job ttl to non-zero so kapp works (# 12090)
> db2e3d6 Use existing directory for working directory test (# 12079)
> ede6459 Check the `ClusterDomainClaim` before creating `kcert`. (# 12080)
> d6de613 Update net-kourier nightly (# 12068)
> 810db5a Update net-istio nightly (# 12076)
> 20be262 allow setting scheduler name in pod spec (# 12036)
> d756f8f Update net-certmanager nightly (# 12075)
Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
1cb893e481
commit
f6a54ce42d
6
go.mod
6
go.mod
|
|
@ -18,10 +18,10 @@ require (
|
|||
k8s.io/cli-runtime v0.21.4
|
||||
k8s.io/client-go v0.21.4
|
||||
k8s.io/code-generator v0.21.4
|
||||
knative.dev/eventing v0.26.1-0.20211002094024-2e917e181ebb
|
||||
knative.dev/eventing v0.26.1-0.20211005140853-8274c41b142e
|
||||
knative.dev/hack v0.0.0-20210806075220-815cd312d65c
|
||||
knative.dev/networking v0.0.0-20211001132006-8da57ce00036
|
||||
knative.dev/pkg v0.0.0-20210929111822-2267a4cbebb8
|
||||
knative.dev/serving v0.26.1-0.20210930173446-b2c010469f2a
|
||||
knative.dev/pkg v0.0.0-20211005203644-a00ba487121e
|
||||
knative.dev/serving v0.26.1-0.20211005205644-365f68bb9489
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
|
|
|||
11
go.sum
11
go.sum
|
|
@ -1669,8 +1669,8 @@ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
|
|||
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
|
||||
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/caching v0.0.0-20210923061712-f2ac32bda031/go.mod h1:FENM93IwhZILPKQLrERGYvWoJXixk/bswKroV1XEXFo=
|
||||
knative.dev/eventing v0.26.1-0.20211002094024-2e917e181ebb h1:wBrQHTQ04lBgRclL0KlSGUOnTWcIJGM6n/Io02X7wRw=
|
||||
knative.dev/eventing v0.26.1-0.20211002094024-2e917e181ebb/go.mod h1:ZRug9kw23qiEdqJQzYDNZMFX0HLsJP2AoqHJT3AtxuY=
|
||||
knative.dev/eventing v0.26.1-0.20211005140853-8274c41b142e h1:d9b5ljgo6QbiMNZb38Z9UKWJKB3cKp2rcx+MGxZsfdM=
|
||||
knative.dev/eventing v0.26.1-0.20211005140853-8274c41b142e/go.mod h1:ZRug9kw23qiEdqJQzYDNZMFX0HLsJP2AoqHJT3AtxuY=
|
||||
knative.dev/hack v0.0.0-20210806075220-815cd312d65c h1:nOXoDWAAItwr4o0dp3nHr6skgpVD4IvME/UX84YNl5k=
|
||||
knative.dev/hack v0.0.0-20210806075220-815cd312d65c/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/hack/schema v0.0.0-20210806075220-815cd312d65c/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
|
||||
|
|
@ -1679,11 +1679,12 @@ knative.dev/networking v0.0.0-20211001132006-8da57ce00036 h1:oabrc/w08b/ZG9hozW5
|
|||
knative.dev/networking v0.0.0-20211001132006-8da57ce00036/go.mod h1:IQMjYdQwtOsqJ+fQDs8MZGB/cPxXdMc4bpP7fdtXp2Q=
|
||||
knative.dev/pkg v0.0.0-20210914164111-4857ab6939e3/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8=
|
||||
knative.dev/pkg v0.0.0-20210919202233-5ae482141474/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8=
|
||||
knative.dev/pkg v0.0.0-20210929111822-2267a4cbebb8 h1:Ut2Z22rH5WfybI5hjEfi9fDU7rK6kIduWpSAgoEXh7M=
|
||||
knative.dev/pkg v0.0.0-20210929111822-2267a4cbebb8/go.mod h1:r27D20afKNeK+9aNOg+0qMv8JgQcyeP+CAYQIR1jEQY=
|
||||
knative.dev/pkg v0.0.0-20211005203644-a00ba487121e h1:gLyCvMSW2wAN4g3J60nJ9L1Ywzn1DbVMfoNMHR+164w=
|
||||
knative.dev/pkg v0.0.0-20211005203644-a00ba487121e/go.mod h1:r27D20afKNeK+9aNOg+0qMv8JgQcyeP+CAYQIR1jEQY=
|
||||
knative.dev/reconciler-test v0.0.0-20210930064245-45904ca4383d/go.mod h1:6yDmb26SINSmgw6wVy9qQwgRMewiW8ddkkwGLR0ZvOY=
|
||||
knative.dev/serving v0.26.1-0.20210930173446-b2c010469f2a h1:YBalvGwCN2GvEcoSsDIp1mxDd+URW9Rj8hXl+rtl80Q=
|
||||
knative.dev/serving v0.26.1-0.20210930173446-b2c010469f2a/go.mod h1:Ha6S1L37YGHiGGucHMkL92Lcg/zgAqZVFuhdZbkoFdI=
|
||||
knative.dev/serving v0.26.1-0.20211005205644-365f68bb9489 h1:qsO6CY6+KKJiLixie1pIq1ChOZ1e2CEgemB51F9+m6o=
|
||||
knative.dev/serving v0.26.1-0.20211005205644-365f68bb9489/go.mod h1:Ha6S1L37YGHiGGucHMkL92Lcg/zgAqZVFuhdZbkoFdI=
|
||||
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
|
||||
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=
|
||||
|
|
|
|||
|
|
@ -49,6 +49,13 @@ func (cs *ChannelSpec) Validate(ctx context.Context) *apis.FieldError {
|
|||
if len(cs.SubscribableSpec.Subscribers) > 0 {
|
||||
errs = errs.Also(apis.ErrDisallowedFields("subscribers").ViaField("subscribable"))
|
||||
}
|
||||
|
||||
if cs.Delivery != nil {
|
||||
if fe := cs.Delivery.Validate(ctx); fe != nil {
|
||||
errs = errs.Also(fe.ViaField("delivery"))
|
||||
}
|
||||
}
|
||||
|
||||
return errs
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ func (ss *SubscriptionSpec) Validate(ctx context.Context) *apis.FieldError {
|
|||
}
|
||||
}
|
||||
|
||||
if ss.Delivery != nil {
|
||||
if fe := ss.Delivery.Validate(ctx); fe != nil {
|
||||
errs = errs.Also(fe.ViaField("delivery"))
|
||||
}
|
||||
}
|
||||
|
||||
return errs
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ package apis
|
|||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
authenticationv1 "k8s.io/api/authentication/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
@ -233,3 +234,22 @@ func WithDryRun(ctx context.Context) context.Context {
|
|||
func IsDryRun(ctx context.Context) bool {
|
||||
return ctx.Value(isDryRun{}) != nil
|
||||
}
|
||||
|
||||
// This is attached to contexts passed to webhook interfaces with
|
||||
// additional context from the HTTP request.
|
||||
type httpReq struct{}
|
||||
|
||||
// WithHTTPRequest associated the HTTP request object the webhook
|
||||
// received with the context.
|
||||
func WithHTTPRequest(ctx context.Context, r *http.Request) context.Context {
|
||||
return context.WithValue(ctx, httpReq{}, r)
|
||||
}
|
||||
|
||||
// GetHTTPRequest fetches the raw HTTP request received by the webhook.
|
||||
func GetHTTPRequest(ctx context.Context) *http.Request {
|
||||
v := ctx.Value(httpReq{})
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return v.(*http.Request)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,10 @@ func (i *impl) TrackReference(ref Reference, obj interface{}) error {
|
|||
invalidFields := map[string][]string{
|
||||
"APIVersion": validation.IsQualifiedName(ref.APIVersion),
|
||||
"Kind": validation.IsCIdentifier(ref.Kind),
|
||||
"Namespace": validation.IsDNS1123Label(ref.Namespace),
|
||||
}
|
||||
// Allow namespace to be empty for cluster-scoped references.
|
||||
if ref.Namespace != "" {
|
||||
invalidFields["Namespace"] = validation.IsDNS1123Label(ref.Namespace)
|
||||
}
|
||||
var selector labels.Selector
|
||||
fieldErrors := []string{}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ func defaultFeaturesConfig() *Features {
|
|||
PodSpecRuntimeClassName: Disabled,
|
||||
PodSpecSecurityContext: Disabled,
|
||||
PodSpecPriorityClassName: Disabled,
|
||||
PodSpecSchedulerName: Disabled,
|
||||
ContainerSpecAddCapabilities: Disabled,
|
||||
PodSpecTolerations: Disabled,
|
||||
PodSpecVolumesEmptyDir: Disabled,
|
||||
|
|
@ -72,6 +73,7 @@ func NewFeaturesConfigFromMap(data map[string]string) (*Features, error) {
|
|||
asFlag("kubernetes.podspec-runtimeclassname", &nc.PodSpecRuntimeClassName),
|
||||
asFlag("kubernetes.podspec-securitycontext", &nc.PodSpecSecurityContext),
|
||||
asFlag("kubernetes.podspec-priorityclassname", &nc.PodSpecPriorityClassName),
|
||||
asFlag("kubernetes.podspec-schedulername", &nc.PodSpecSchedulerName),
|
||||
asFlag("kubernetes.containerspec-addcapabilities", &nc.ContainerSpecAddCapabilities),
|
||||
asFlag("kubernetes.podspec-tolerations", &nc.PodSpecTolerations),
|
||||
asFlag("kubernetes.podspec-volumes-emptydir", &nc.PodSpecVolumesEmptyDir),
|
||||
|
|
@ -98,6 +100,7 @@ type Features struct {
|
|||
PodSpecRuntimeClassName Flag
|
||||
PodSpecSecurityContext Flag
|
||||
PodSpecPriorityClassName Flag
|
||||
PodSpecSchedulerName Flag
|
||||
ContainerSpecAddCapabilities Flag
|
||||
PodSpecTolerations Flag
|
||||
PodSpecVolumesEmptyDir Flag
|
||||
|
|
|
|||
|
|
@ -210,6 +210,9 @@ func PodSpecMask(ctx context.Context, in *corev1.PodSpec) *corev1.PodSpec {
|
|||
if cfg.Features.PodSpecPriorityClassName != config.Disabled {
|
||||
out.PriorityClassName = in.PriorityClassName
|
||||
}
|
||||
if cfg.Features.PodSpecSchedulerName != config.Disabled {
|
||||
out.SchedulerName = in.SchedulerName
|
||||
}
|
||||
|
||||
// Disallowed fields
|
||||
// This list is unnecessary, but added here for clarity
|
||||
|
|
@ -225,7 +228,6 @@ func PodSpecMask(ctx context.Context, in *corev1.PodSpec) *corev1.PodSpec {
|
|||
out.ShareProcessNamespace = nil
|
||||
out.Hostname = ""
|
||||
out.Subdomain = ""
|
||||
out.SchedulerName = ""
|
||||
out.Priority = nil
|
||||
out.DNSConfig = nil
|
||||
out.ReadinessGates = nil
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ k8s.io/utils/buffer
|
|||
k8s.io/utils/integer
|
||||
k8s.io/utils/pointer
|
||||
k8s.io/utils/trace
|
||||
# knative.dev/eventing v0.26.1-0.20211002094024-2e917e181ebb
|
||||
# knative.dev/eventing v0.26.1-0.20211005140853-8274c41b142e
|
||||
## explicit
|
||||
knative.dev/eventing/pkg/apis/config
|
||||
knative.dev/eventing/pkg/apis/duck
|
||||
|
|
@ -765,7 +765,7 @@ knative.dev/networking/pkg/apis/networking/v1alpha1
|
|||
knative.dev/networking/pkg/client/clientset/versioned
|
||||
knative.dev/networking/pkg/client/clientset/versioned/scheme
|
||||
knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1
|
||||
# knative.dev/pkg v0.0.0-20210929111822-2267a4cbebb8
|
||||
# knative.dev/pkg v0.0.0-20211005203644-a00ba487121e
|
||||
## explicit
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
@ -815,7 +815,7 @@ knative.dev/pkg/tracing/propagation
|
|||
knative.dev/pkg/tracing/propagation/tracecontextb3
|
||||
knative.dev/pkg/tracker
|
||||
knative.dev/pkg/unstructured
|
||||
# knative.dev/serving v0.26.1-0.20210930173446-b2c010469f2a
|
||||
# knative.dev/serving v0.26.1-0.20211005205644-365f68bb9489
|
||||
## explicit
|
||||
knative.dev/serving/pkg/apis/autoscaling
|
||||
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
|
||||
|
|
|
|||
Loading…
Reference in New Issue