mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#724)
bumping knative.dev/pkg 2f55fe0...2fdd6bf: > 2fdd6bf Allow reconcilers to listen to leader promotion events (# 2688) > f65eba5 Make ZipkinTracingEnabled flag thread safe (# 2690) > f306c13 upgrade to latest dependencies (# 2684) bumping knative.dev/hack f41894d...f2f3107: > f2f3107 Update community files (# 273) Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
8d7b744b07
commit
4ee229f529
4
go.mod
4
go.mod
|
@ -11,8 +11,8 @@ require (
|
|||
k8s.io/client-go v0.25.4
|
||||
k8s.io/code-generator v0.25.4
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1
|
||||
knative.dev/hack v0.0.0-20230217102452-f41894d46285
|
||||
knative.dev/pkg v0.0.0-20230215234751-2f55fe00c5a1
|
||||
knative.dev/hack v0.0.0-20230217131352-f2f3107be156
|
||||
knative.dev/pkg v0.0.0-20230222150228-2fdd6bf8be31
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
8
go.sum
8
go.sum
|
@ -798,10 +798,10 @@ k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkI
|
|||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU=
|
||||
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
|
||||
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
knative.dev/hack v0.0.0-20230217102452-f41894d46285 h1:Dob2U1RSxhFSbe6saMQo+ETzqyM3XxTShOJTUOBSrgo=
|
||||
knative.dev/hack v0.0.0-20230217102452-f41894d46285/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
|
||||
knative.dev/pkg v0.0.0-20230215234751-2f55fe00c5a1 h1:uFmSftQza1crgKoZWRvPthuGynJgVEN3aFcXORqZpDQ=
|
||||
knative.dev/pkg v0.0.0-20230215234751-2f55fe00c5a1/go.mod h1:YVKzsxts9YjMq9xbG1GrMWwwGmkJRpJxqCa6iIOKb28=
|
||||
knative.dev/hack v0.0.0-20230217131352-f2f3107be156 h1:l4/KJeKC7Nrm9WUF3AhAnvoj00OogWfPJKrBP8tbN8c=
|
||||
knative.dev/hack v0.0.0-20230217131352-f2f3107be156/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
|
||||
knative.dev/pkg v0.0.0-20230222150228-2fdd6bf8be31 h1:/A/yJ4IzvMLYCCiQ8Ew3DweTtF2s7t3LQosmmo5T46o=
|
||||
knative.dev/pkg v0.0.0-20230222150228-2fdd6bf8be31/go.mod h1:FLoALs9HfjVPT7sjrpvNLqO+mx+RzJZwUJ2b0UsLLus=
|
||||
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=
|
||||
|
|
|
@ -64,10 +64,15 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF
|
|||
lister := imageInformer.Lister()
|
||||
|
||||
var promoteFilterFunc func(obj interface{}) bool
|
||||
var promoteFunc = func(bkt reconciler.Bucket) {}
|
||||
|
||||
rec := &reconcilerImpl{
|
||||
LeaderAwareFuncs: reconciler.LeaderAwareFuncs{
|
||||
PromoteFunc: func(bkt reconciler.Bucket, enq func(reconciler.Bucket, types.NamespacedName)) error {
|
||||
|
||||
// Signal promotion event
|
||||
promoteFunc(bkt)
|
||||
|
||||
all, err := lister.List(labels.Everything())
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -125,6 +130,9 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF
|
|||
if opts.PromoteFilterFunc != nil {
|
||||
promoteFilterFunc = opts.PromoteFilterFunc
|
||||
}
|
||||
if opts.PromoteFunc != nil {
|
||||
promoteFunc = opts.PromoteFunc
|
||||
}
|
||||
}
|
||||
|
||||
rec.Recorder = createRecorder(ctx, agentName)
|
||||
|
|
|
@ -230,10 +230,15 @@ func NewImpl(ctx {{.contextContext|raw}}, r Interface{{if .hasClass}}, classValu
|
|||
lister := {{.type|lowercaseSingular}}Informer.Lister()
|
||||
|
||||
var promoteFilterFunc func(obj interface{}) bool
|
||||
var promoteFunc = func(bkt {{.reconcilerBucket|raw}}) {}
|
||||
|
||||
rec := &reconcilerImpl{
|
||||
LeaderAwareFuncs: {{.reconcilerLeaderAwareFuncs|raw}}{
|
||||
PromoteFunc: func(bkt {{.reconcilerBucket|raw}}, enq func({{.reconcilerBucket|raw}}, {{.typesNamespacedName|raw}})) error {
|
||||
|
||||
// Signal promotion event
|
||||
promoteFunc(bkt)
|
||||
|
||||
all, err := lister.List({{.labelsEverything|raw}}())
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -295,6 +300,9 @@ func NewImpl(ctx {{.contextContext|raw}}, r Interface{{if .hasClass}}, classValu
|
|||
if opts.PromoteFilterFunc != nil {
|
||||
promoteFilterFunc = opts.PromoteFilterFunc
|
||||
}
|
||||
if opts.PromoteFunc != nil {
|
||||
promoteFunc = opts.PromoteFunc
|
||||
}
|
||||
}
|
||||
|
||||
rec.Recorder = createRecorder(ctx, agentName)
|
||||
|
|
|
@ -46,6 +46,10 @@ type Options struct {
|
|||
// Objects that pass the filter (return true) will be reconciled when a new leader is promoted.
|
||||
// If no filter is specified, all objects will be reconciled.
|
||||
PromoteFilterFunc func(obj interface{}) bool
|
||||
|
||||
// PromoteFunc is called when a reconciler is promoted for the given bucket
|
||||
// The provided function must not block execution.
|
||||
PromoteFunc func(bkt reconciler.Bucket)
|
||||
}
|
||||
|
||||
// OptionsFn is a callback method signature that accepts an Impl and returns
|
||||
|
|
|
@ -687,10 +687,10 @@ k8s.io/utils/internal/third_party/forked/golang/net
|
|||
k8s.io/utils/net
|
||||
k8s.io/utils/strings/slices
|
||||
k8s.io/utils/trace
|
||||
# knative.dev/hack v0.0.0-20230217102452-f41894d46285
|
||||
# knative.dev/hack v0.0.0-20230217131352-f2f3107be156
|
||||
## explicit; go 1.18
|
||||
knative.dev/hack
|
||||
# knative.dev/pkg v0.0.0-20230215234751-2f55fe00c5a1
|
||||
# knative.dev/pkg v0.0.0-20230222150228-2fdd6bf8be31
|
||||
## explicit; go 1.18
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
Loading…
Reference in New Issue