Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use controller-runtime controllerutil package #255

Open
1 task
troy0820 opened this issue Aug 29, 2023 · 1 comment
Open
1 task

Use controller-runtime controllerutil package #255

troy0820 opened this issue Aug 29, 2023 · 1 comment
Labels
2 - 🍕 Pizza should be eaten daily enhancement New code, ahoy! self care 💅🏽 Tasks that help keep Porter running smoothly tech debt 💸

Comments

@troy0820
Copy link
Member

What design is being proposed?

We have a lot of functionality that is already done in the controllerutil package of controller-runtime. We can leverage this to remove
the complexity of writing our own and reduce cognitive load around functionality that already exists.

Since upgrading controller-runtime we can also use interceptors in our unit tests which act like a prependReactor from client-go to assert on the failures of certain client calls.

Additional Context

This will help provide a means to help maintainability around the operator going forward.

Risks/Concerns

Benefits include utilizing a lib that already does what we need to replace the shared logic we are trying to consume and decouple the things we have rolled out to better create the operator going forward.

What other approaches were considered?

If we don't do it, we suffer the implementation that was used from over a year ago to maintain what could be utilized with a lib we already import.

Implementation details

Swapping out functions, deleting old code and updating the use cases we wish to implement.

Checklist

  • This proposal has remained open for at least one week, to allow time for community feedback.
@troy0820 troy0820 added 2 - 🍕 Pizza should be eaten daily enhancement New code, ahoy! self care 💅🏽 Tasks that help keep Porter running smoothly tech debt 💸 labels Aug 29, 2023
@troy0820
Copy link
Member Author

We have a lot of functions that do what this package does such as

remove<name of thing>Finalizer which actually uses the package in question. If we want to standardize around this to not have as many functions which do the same thing, we can optimize here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
2 - 🍕 Pizza should be eaten daily enhancement New code, ahoy! self care 💅🏽 Tasks that help keep Porter running smoothly tech debt 💸
Projects
None yet
Development

No branches or pull requests

1 participant