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

runtime/patch: Add SerialPatcher #379

Merged
merged 1 commit into from
Oct 14, 2022
Merged

runtime/patch: Add SerialPatcher #379

merged 1 commit into from
Oct 14, 2022

Conversation

darkowlzz
Copy link
Contributor

@darkowlzz darkowlzz commented Oct 14, 2022

SerialPatcher is a wrapper around the patch helper to help perform consecutive patching of object in a transparent manner without the need to keep track of the object state after patching.

The SerialPatcher persists a before state of the object and a kubernetes client. The patch operation configurations aren't persisted and are accepted as argument to SerialPatcher.Patch(). This makes the patcher reusable in different scenarios during its lifetime.

@darkowlzz darkowlzz added the area/runtime Controller runtime related issues and pull requests label Oct 14, 2022
@darkowlzz darkowlzz changed the title runtime/patcher: Add SerialPatcher runtime/patch: Add SerialPatcher Oct 14, 2022
SerialPatcher is a wrapper around the patch helper to help perform
consecutive patching of object in a transparent manner without the need
to keep track of the object state after patching.

The SerialPatcher persists the a before state of the object and a
kubernetes client. The patch operations configurations aren't persisted
and are accepted as argument to SerialPatcher.Patch(). This makes the
patcher reusable in different scenarios during its lifetime.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @darkowlzz 🏅

@hiddeco
Copy link
Member

hiddeco commented Oct 14, 2022

This looks good to me as well, thanks for taking my suggestions into account around API simplification and caller responsibilities. 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime Controller runtime related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants