[master] Auto-update dependencies (#298)

Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
This commit is contained in:
Matt Moore 2020-07-30 11:01:01 -07:00 committed by GitHub
parent 446be89872
commit d5ae48ced0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 56 additions and 35 deletions

4
go.mod
View File

@ -16,8 +16,8 @@ require (
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/code-generator v0.18.0
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
knative.dev/pkg v0.0.0-20200729100859-68b3eeeaab46
knative.dev/test-infra v0.0.0-20200729023559-d33097928a54
knative.dev/pkg v0.0.0-20200729214559-47e34f1f4ef1
knative.dev/test-infra v0.0.0-20200729161259-d21e6ed450cb
)
replace (

20
go.sum
View File

@ -37,7 +37,6 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
cloud.google.com/go/pubsub v1.6.0/go.mod h1:I6DkrTv7tKIvDQTZt+6rAFo1446FEoVDJeLXTu4pCcE=
cloud.google.com/go/pubsub v1.6.1/go.mod h1:kvW9rcn9OLEx6eTIzMBbWbpB8YsK3vu9jxgPolVz+p4=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
@ -1328,8 +1327,6 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c h1:UIcGWL6/wpCfyGuJnRFJRurA+yj8RrW7Q6x2YMCXt6c=
golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE=
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1438,10 +1435,6 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200709181711-e327e1019dfe/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200721223218-6123e77877b2 h1:kxDWg8KNMtpGjI/XVKGgOtSljTnVg/PrjhS8+0pxjLE=
golang.org/x/tools v0.0.0-20200721223218-6123e77877b2/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200724172932-b5fc9d354d99 h1:OHn441rq5CeM5r1xJ0OmY7lfdTvnedi6k+vQiI7G9b8=
golang.org/x/tools v0.0.0-20200724172932-b5fc9d354d99/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200725200936-102e7d357031/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200727233628-55644ead90ce h1:HEwYEPqqa3/M0N2Q6IgtBaf2CaxvmRiVdAhX6LR7uE4=
golang.org/x/tools v0.0.0-20200727233628-55644ead90ce/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
@ -1537,10 +1530,6 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200709005830-7a2ca40e9dc3/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200722002428-88e341933a54 h1:ASrBgpl9XvkNTP0m39/j18mid7aoF21npu2ioIBxYnY=
google.golang.org/genproto v0.0.0-20200722002428-88e341933a54/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200724131911-43cab4749ae7 h1:AWgNCmk2V5HZp9AiCDRBExX/b9I0Ey9F8STHDZlhCC4=
google.golang.org/genproto v0.0.0-20200724131911-43cab4749ae7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200726014623-da3ae01ef02d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200728010541-3dc8dca74b7b h1:FWkel6k8GbR7SbBY200Cz8tA58/KtMrfpVZwOOSjOvQ=
google.golang.org/genproto v0.0.0-20200728010541-3dc8dca74b7b/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
@ -1681,7 +1670,6 @@ k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuB
k8s.io/metrics v0.17.2/go.mod h1:3TkNHET4ROd+NfzNxkjoVfQ0Ob4iZnaHmSEA4vYpwLw=
k8s.io/test-infra v0.0.0-20200514184223-ba32c8aae783/go.mod h1:bW6thaPZfL2hW7ecjx2WYwlP9KQLM47/xIJyttkVk5s=
k8s.io/test-infra v0.0.0-20200617221206-ea73eaeab7ff/go.mod h1:L3+cRvwftUq8IW1TrHji5m3msnc4uck/7LsE/GR/aZk=
k8s.io/test-infra v0.0.0-20200724210216-b2cdf8399d01/go.mod h1:4cRZlOy5Ka3Ym/orCmNWL2dsE39pN0xHFT0WFrZe2HQ=
k8s.io/test-infra v0.0.0-20200728085909-4407d8aec1ee/go.mod h1:4cRZlOy5Ka3Ym/orCmNWL2dsE39pN0xHFT0WFrZe2HQ=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200124190032-861946025e34 h1:HjlUD6M0K3P8nRXmr2B9o4F9dUy9TCj/aEpReeyi6+k=
@ -1689,12 +1677,12 @@ k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20200729100859-68b3eeeaab46 h1:tRLgDNTfz90qg99llBjfN2EPbzwHkYfSPJvpBQxSKvA=
knative.dev/pkg v0.0.0-20200729100859-68b3eeeaab46/go.mod h1:ur42MwFkZfPfqZPt987/rkdkaUhWfuuO7+jKbEUE+uk=
knative.dev/test-infra v0.0.0-20200725213358-8557dab80d7a h1:Coxwj+5PN0WCrRh2Dxf33Nu2QteF4hcy55qw+AJKMSw=
knative.dev/test-infra v0.0.0-20200725213358-8557dab80d7a/go.mod h1:Besm7oWHKZcLfn5lmBw/JCmQrOMCKUuM3tSKi6insQ4=
knative.dev/pkg v0.0.0-20200729214559-47e34f1f4ef1 h1:RSIVAug90vyIfJzYqOJSyzYCb+mTSIyHD7Rn3UvLDmM=
knative.dev/pkg v0.0.0-20200729214559-47e34f1f4ef1/go.mod h1:Anw0Jhhgt/6YoUxiIANo5a4MtsraFCdRY9UMeOKjsY0=
knative.dev/test-infra v0.0.0-20200729023559-d33097928a54 h1:wuYWc/LMyEKE0grD7HMdMWcM1b1VqlEB2GtR7J4nVAQ=
knative.dev/test-infra v0.0.0-20200729023559-d33097928a54/go.mod h1:AfEfWe/Z/DIA2vQSbSTxMVlF+ErBD7Oqc4/K/x1no90=
knative.dev/test-infra v0.0.0-20200729161259-d21e6ed450cb h1:fwkMDaKklHbKrZpMvjIHrLfk8AXAhiiB1VNEpXrBFZI=
knative.dev/test-infra v0.0.0-20200729161259-d21e6ed450cb/go.mod h1:AfEfWe/Z/DIA2vQSbSTxMVlF+ErBD7Oqc4/K/x1no90=
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=

View File

@ -214,7 +214,8 @@ func IsDifferentNamespaceAllowed(ctx context.Context) bool {
return ctx.Value(allowDifferentNamespace{}) != nil
}
// This is attached to contexts passed to webhook interfaces when the user has request DryRun mode.
// This is attached to contexts passed to webhook interfaces when the user
// has requested DryRun mode.
type isDryRun struct{}
// WithDryRun is used to indicate that this call is in DryRun mode.

View File

@ -176,6 +176,22 @@ func (g *reconcilerReconcilerGenerator) GenerateType(c *generator.Context, t *ty
Package: "k8s.io/apimachinery/pkg/labels",
Name: "Everything",
}),
"doReconcileKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoReconcileKind",
}),
"doObserveKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoObserveKind",
}),
"doFinalizeKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoFinalizeKind",
}),
"doObserveFinalizeKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoObserveFinalizeKind",
}),
}
sw.Do(reconcilerInterfaceFactory, m)
@ -232,13 +248,6 @@ type ReadOnlyFinalizer interface {
type doReconcile func(ctx {{.contextContext|raw}}, o *{{.type|raw}}) {{.reconcilerEvent|raw}}
const (
doReconcileKind = "ReconcileKind"
doFinalizeKind = "FinalizeKind"
doObserveKind = "ObserveKind"
doObserveFinalizeKind = "ObserveFinalizeKind"
)
// reconcilerImpl implements controller.Reconciler for {{.type|raw}} resources.
type reconcilerImpl struct {
// LeaderAwareFuncs is inlined to help us implement {{.reconcilerLeaderAware|raw}}
@ -398,7 +407,7 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro
// Append the target method to the logger.
logger = logger.With(zap.String("targetMethod", name))
switch name {
case doReconcileKind:
case {{.doReconcileKind|raw}}:
// Append the target method to the logger.
logger = logger.With(zap.String("targetMethod", "ReconcileKind"))
@ -419,7 +428,7 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro
reconciler.PostProcessReconcile(ctx, resource, original)
{{end}}
case "FinalizeKind":
case {{.doFinalizeKind|raw}}:
// For finalizing reconcilers, if this resource being marked for deletion
// and reconciled cleanly (nil or normal event), remove the finalizer.
reconcileEvent = do(ctx, resource)
@ -428,7 +437,7 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro
return {{.fmtErrorf|raw}}("failed to clear finalizers: %w", err)
}
case "ObserveKind", "ObserveFinalizeKind":
case {{.doObserveKind|raw}}, {{.doObserveFinalizeKind|raw}}:
// Observe any changes to this resource, since we are not the leader.
reconcileEvent = do(ctx, resource)

View File

@ -72,6 +72,22 @@ func (g *reconcilerStateGenerator) GenerateType(c *generator.Context, t *types.T
Package: "k8s.io/apimachinery/pkg/types",
Name: "NamespacedName",
}),
"doReconcileKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoReconcileKind",
}),
"doObserveKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoObserveKind",
}),
"doFinalizeKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoFinalizeKind",
}),
"doObserveFinalizeKind": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/reconciler",
Name: "DoObserveFinalizeKind",
}),
}
sw.Do(reconcilerStateType, m)
@ -149,14 +165,14 @@ func (s *state) isNotLeaderNorObserver() bool {
func (s *state) reconcileMethodFor(o *{{.type|raw}}) (string, doReconcile) {
if o.GetDeletionTimestamp().IsZero() {
if s.isLeader {
return doReconcileKind, s.reconciler.ReconcileKind
return {{.doReconcileKind|raw}}, s.reconciler.ReconcileKind
} else if s.isROI {
return doObserveKind, s.roi.ObserveKind
return {{.doObserveKind|raw}}, s.roi.ObserveKind
}
} else if fin, ok := s.reconciler.(Finalizer); s.isLeader && ok {
return doFinalizeKind, fin.FinalizeKind
return {{.doFinalizeKind|raw}}, fin.FinalizeKind
} else if !s.isLeader && s.isROF {
return doObserveFinalizeKind, s.rof.ObserveFinalizeKind
return {{.doObserveFinalizeKind|raw}}, s.rof.ObserveFinalizeKind
}
return "unknown", nil
}

View File

@ -30,6 +30,13 @@ import (
const failedGenerationBump = "NewObservedGenFailure"
const (
DoReconcileKind = "ReconcileKind"
DoFinalizeKind = "FinalizeKind"
DoObserveKind = "ObserveKind"
DoObserveFinalizeKind = "ObserveFinalizeKind"
)
// PreProcessReconcile contains logic to apply before reconciliation of a resource.
func PreProcessReconcile(ctx context.Context, resource duckv1.KRShaped) {
newStatus := resource.GetStatus()

4
vendor/modules.txt vendored
View File

@ -747,7 +747,7 @@ k8s.io/kube-openapi/pkg/util/sets
k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/trace
# knative.dev/pkg v0.0.0-20200729100859-68b3eeeaab46
# knative.dev/pkg v0.0.0-20200729214559-47e34f1f4ef1
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck/ducktypes
@ -771,7 +771,7 @@ knative.dev/pkg/metrics/metricskey
knative.dev/pkg/network
knative.dev/pkg/reconciler
knative.dev/pkg/system
# knative.dev/test-infra v0.0.0-20200729023559-d33097928a54
# knative.dev/test-infra v0.0.0-20200729161259-d21e6ed450cb
## explicit
knative.dev/test-infra/scripts
knative.dev/test-infra/tools/dep-collector