Skip to content
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

Refactor reconcilers and implementations #250

Merged
merged 13 commits into from
Oct 14, 2022

Conversation

pleshakov
Copy link
Contributor

Previously, all reconcilers and implementations looked almost the same.

This PR:

  • Replaces all reconcilers with a single one.
  • Removes all implementations. Now the reconciler sends upsert and delete events to the event channel instead of the implementations. The sending to the events part of the reconciler doesn't have the shutdown bug (a possibility to hang while sending to the channel during the shutdown) all implementations shared.
  • Removes the sdk package.

Additionally, the Manager now uses the same logger as the other components.

@github-actions github-actions bot added the chore Pull requests for routine tasks label Sep 23, 2022
@pleshakov pleshakov added the bug Something isn't working label Sep 23, 2022
@pleshakov pleshakov force-pushed the chore/refactor-implementations-and-controllers branch from 05f549b to bd92697 Compare September 23, 2022 23:06
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed bug Something isn't working labels Sep 23, 2022
@pleshakov pleshakov force-pushed the chore/refactor-implementations-and-controllers branch from 966c5f4 to c6e289f Compare September 26, 2022 15:26
@pleshakov pleshakov added the bug Something isn't working label Sep 26, 2022
Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 🔥

Really nice work! This is a huge improvement over what we had before.

Just a couple of small comments and questions.

internal/controller/controller_suit_test.go Outdated Show resolved Hide resolved
internal/controller/reconciler.go Outdated Show resolved Hide resolved
internal/controller/reconciler_test.go Outdated Show resolved Hide resolved
internal/controller/reconciler_test.go Outdated Show resolved Hide resolved
internal/controller/reconciler_test.go Outdated Show resolved Hide resolved
internal/controller/reconciler_test.go Outdated Show resolved Hide resolved
internal/controller/register.go Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the bug Something isn't working label Sep 28, 2022
@pleshakov pleshakov force-pushed the chore/refactor-implementations-and-controllers branch 4 times, most recently from a594e1a to 6a252c1 Compare October 5, 2022 18:17
@pleshakov
Copy link
Contributor Author

Changes from the previous version:

  • reconciler.Reconciler was renamed to reconciler.Implementation
  • changes from Deduplicate endpoints #253 were incorporated into the refactor -- manager package now includes index package (for indices) and predicate (for predicates)
  • tests were added to test controller registration

@pleshakov pleshakov added the bug Something isn't working label Oct 5, 2022
internal/manager/controllers.go Outdated Show resolved Hide resolved
internal/manager/controllers.go Outdated Show resolved Hide resolved
internal/manager/controllers.go Outdated Show resolved Hide resolved
internal/manager/controllers.go Show resolved Hide resolved
internal/manager/controllers.go Outdated Show resolved Hide resolved
internal/manager/controllers.go Outdated Show resolved Hide resolved
internal/manager/controllers_test.go Outdated Show resolved Hide resolved
internal/manager/manager.go Outdated Show resolved Hide resolved
internal/manager/manager.go Outdated Show resolved Hide resolved
@pleshakov pleshakov force-pushed the chore/refactor-implementations-and-controllers branch from 6a252c1 to 2d818d6 Compare October 7, 2022 22:15
@github-actions github-actions bot removed the bug Something isn't working label Oct 7, 2022
internal/manager/controllers.go Outdated Show resolved Hide resolved
internal/manager/controllers.go Outdated Show resolved Hide resolved
internal/manager/index/endpointslice.go Show resolved Hide resolved
Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@pleshakov pleshakov added the bug Something isn't working label Oct 12, 2022
@github-actions github-actions bot removed the bug Something isn't working label Oct 14, 2022
Previously, all reconcilers and implementations looked almost the same.

This commit:
- Replaces all reconcilers with a single one.
- Removes all implementations. Now the reconciler sends upsert and
delete events to the event channel instead of the implementations.
The sending to the events part of the reconciler doesn't have
the shutdown bug (a possibility to hang while sending to the channel
during the shutdown) all implementations shared.
- Removes the sdk package.

Additionally, the Manager now uses the same logger as the other
components.
@pleshakov pleshakov force-pushed the chore/refactor-implementations-and-controllers branch from 53b9cb8 to d1cf071 Compare October 14, 2022 16:55
@pleshakov pleshakov added the bug Something isn't working label Oct 14, 2022
@pleshakov pleshakov merged commit 7328fee into main Oct 14, 2022
@pleshakov pleshakov deleted the chore/refactor-implementations-and-controllers branch October 14, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Pull requests for routine tasks dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants