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 #104

Merged
merged 1 commit into from
Jan 12, 2021
Merged

Conversation

phillebaba
Copy link
Member

@phillebaba phillebaba commented Dec 20, 2020

Ref: fluxcd/flux2#613

This PR upgrades the controller-runtime dependency to v0.7.0,
including all changes required to make all wiring work again.

  • Upgrade runtime to v0.6.0 to include controller-runtime changes.
  • Loggers have been removed from the reconcilers and are now retrieved
    from the context.Context passed to the Reconcile method and
    downwards functions.
  • Logger configuration flags are now bound to the flag set using
    BindFlags from runtime/logger, ensuring the same contract across
    GitOps Toolkit controllers, and the --log-json flag has been
    deprecated in favour of the --log-encoding=json default.
  • The ChangePredicate from runtime has changed to a
    ReconcilateAtChangedPredicate, and is now chained with the
    GenerationChangedPredicate from controller-runtime using
    predicate.Or.
  • The leader-election-role was changed, as leader election now works
    via the coordination/v1 API.

Other notable changes:

  • Use DeletionTimestamp of resource object to determine readiness.
  • source-controller API dependency has been upgraded to v0.6.0
    which also uses controller-runtime v0.7.0.

@phillebaba phillebaba force-pushed the controller-runtime-update branch from cc5a5a6 to 8ff0666 Compare December 20, 2020 13:10
@phillebaba phillebaba force-pushed the controller-runtime-update branch from 8ff0666 to 0cabdac Compare December 20, 2020 13:27
@hiddeco hiddeco force-pushed the controller-runtime-update branch 2 times, most recently from e288fd9 to 5e14d77 Compare January 12, 2021 13:57
@hiddeco hiddeco requested a review from stefanprodan January 12, 2021 13:57
go.mod Outdated Show resolved Hide resolved
@hiddeco hiddeco force-pushed the controller-runtime-update branch from 5e14d77 to 9cbaac3 Compare January 12, 2021 14:03
This commit upgrades the `controller-runtime` dependency to `v0.7.0`,
including all changes required to make all wiring work again.

- Upgrade `runtime` to v0.6.0 to include `controller-runtime` changes.
- Loggers have been removed from the reconcilers and are now retrieved
  from the `context.Context` passed to the `Reconcile` method and
  downwards functions.
- Logger configuration flags are now bound to the flag set using
  `BindFlags` from `runtime/logger`, ensuring the same contract across
  GitOps Toolkit controllers, and the `--log-json` flag has been
  deprecated in favour of the `--log-encoding=json` default.
- The `ChangePredicate` from `runtime` has changed to a
  `ReconcilateAtChangedPredicate`, and is now chained with the
  `GenerationChangedPredicate` from `controller-runtime` using
  `predicate.Or`.
- The `leader-election-role` was changed, as leader election now works
  via the `coordination/v1` API.

Other notable changes:

- Use `DeletionTimestamp` of resource object to determine readiness.
- `source-controller` API dependency has been upgraded to `v0.6.0`
  which also uses `controller-runtime` `v0.7.0`.

Co-authored-by: Hidde Beydals <[email protected]>
Signed-off-by: Philip Laine <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
@hiddeco hiddeco force-pushed the controller-runtime-update branch from 9cbaac3 to ed9382e Compare January 12, 2021 14:06
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 merged commit e95cdc6 into main Jan 12, 2021
@hiddeco hiddeco deleted the controller-runtime-update branch January 12, 2021 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants