-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow reconcilers to listen to leader promotion events #2688
Allow reconcilers to listen to leader promotion events #2688
Conversation
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
/cc @dprotaso I couldn't find any unit test for this area, any ideas? |
Yeah - we at least have coverage that the code generation can compile (via prow/action checks) and we have downstream tests to catch breaking changes. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Generator: allow reconcilers to listen to leader promotion events Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Run hack/update-codegen.sh Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Allow reconcilers to listen to leader promotion events (#2688) * Generator: allow reconcilers to listen to leader promotion events Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Run hack/update-codegen.sh Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * run update-deps --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Fixes #6732 The autoscaler runs in every controller replica [1], it tries to scale down on every replica after the given refresh period, and sometimes the 2 replicas don't agree on which value to use for the new replicas since the state is lister/cache based, leading to a too fast scale up or down behavior or sometime not converging. (also because of #6733) Implementations should be using knative/pkg#2675 for enabling leader-aware autoscaler. (PR knative/pkg#2688) [1] https://github.com/knative/eventing/blob/1092472f440586099d6a5cbf1d3234bb36431af4/pkg/scheduler/statefulset/autoscaler.go#L85-L103 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Fixes knative#6732 The autoscaler runs in every controller replica [1], it tries to scale down on every replica after the given refresh period, and sometimes the 2 replicas don't agree on which value to use for the new replicas since the state is lister/cache based, leading to a too fast scale up or down behavior or sometime not converging. (also because of knative#6733) Implementations should be using knative/pkg#2675 for enabling leader-aware autoscaler. (PR knative/pkg#2688) [1] https://github.com/knative/eventing/blob/1092472f440586099d6a5cbf1d3234bb36431af4/pkg/scheduler/statefulset/autoscaler.go#L85-L103 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Fixes knative#6732 The autoscaler runs in every controller replica [1], it tries to scale down on every replica after the given refresh period, and sometimes the 2 replicas don't agree on which value to use for the new replicas since the state is lister/cache based, leading to a too fast scale up or down behavior or sometime not converging. (also because of knative#6733) Implementations should be using knative/pkg#2675 for enabling leader-aware autoscaler. (PR knative/pkg#2688) [1] https://github.com/knative/eventing/blob/1092472f440586099d6a5cbf1d3234bb36431af4/pkg/scheduler/statefulset/autoscaler.go#L85-L103 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
The current approach doesn't allow controllers to hook
additional logic when a reconciler is promoted for buckets,
only when it is demoted with
DemoteFunc
passed throughthe
controller.OptionsFn
function.In eventing, we have components running in the background
(aka detached to resource created/update/delete),
which should only take action when a given reconciler
is the leader (the autoscaler).
Fixes #2675
Release Note