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

Upgrade controller-runtime to v0.7.0 #63

Merged
merged 3 commits into from
Dec 17, 2020

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Dec 16, 2020

Ref: fluxcd/flux2#613

  • upgrade controller-runtime to v0.7.0
  • refactor ChangePredicate to chain-able ReconcileAtChangedPredicate including event.UpdateEvent changes
  • refactor runtime/logger to re-use more of sigs.k8s.io/controller-runtime/pkg/log/zap

As predicates can be chained and used in conjunction with others,
it is more useful to do just one thing in the predicate: detecting
changes to the meta.ReconcileAtAnnotation.

The generation changes can still be detected by chaining the predicate
together with the predicate.GenerationChangedPredicate from
controller-runtime itself using predicate.Or.

Signed-off-by: Hidde Beydals <[email protected]>
@hiddeco hiddeco force-pushed the runtime/controller-runtime-v0.7.0 branch from be66e5a to 1a63245 Compare December 16, 2020 21:09
@hiddeco hiddeco added the enhancement New feature or request label Dec 17, 2020
@hiddeco hiddeco requested a review from stefanprodan December 17, 2020 11:28
@hiddeco hiddeco marked this pull request as ready for review December 17, 2020 11:28
runtime/logger/logger.go Outdated Show resolved Hide resolved
@hiddeco hiddeco force-pushed the runtime/controller-runtime-v0.7.0 branch 5 times, most recently from d4a50f9 to 6c37f8d Compare December 17, 2020 12:23
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

@hiddeco hiddeco force-pushed the runtime/controller-runtime-v0.7.0 branch 2 times, most recently from 909c9b7 to 7fe639a Compare December 17, 2020 12:37
This commit refactors the `runtime/logger` package so that consumers
can bind their flagset to the default flag configuration, making it
easier for all consumers to follow the same contract.

Signed-off-by: Hidde Beydals <[email protected]>
@hiddeco hiddeco force-pushed the runtime/controller-runtime-v0.7.0 branch from 7fe639a to 7bbb6fc Compare December 17, 2020 12:44
@hiddeco hiddeco merged commit 9e1fe56 into main Dec 17, 2020
@hiddeco hiddeco deleted the runtime/controller-runtime-v0.7.0 branch December 17, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants