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

Merged
merged 1 commit into from
Jan 11, 2021
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Dec 18, 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.
  • Signatures that made use of runtime.Object have changed to
    client.Object, removing the requirement to e.g. call
    runtime.Object#Object.
  • The leader-election-role was changed, as leader election now works
    via the coordination/v1 API.

Other notable changes:

  • util.ObjectKey was added to easily construct a client.ObjectKey /
    types.NamespacedName from a metav1.Object.

@hiddeco hiddeco added area/ci CI related issues and pull requests hold Issues and pull requests put on hold labels Dec 18, 2020
@hiddeco hiddeco force-pushed the controller-runtime-v0.7.0 branch from a8e3305 to bf3551d Compare January 11, 2021 12:40
@hiddeco hiddeco requested a review from stefanprodan January 11, 2021 12:40
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 🚀

config/rbac/leader_election_role.yaml Show resolved Hide resolved
@hiddeco hiddeco force-pushed the controller-runtime-v0.7.0 branch 2 times, most recently from c34ad70 to 7338b6c Compare January 11, 2021 12:54
@hiddeco hiddeco removed the hold Issues and pull requests put on hold label Jan 11, 2021
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`.
- Signatures that made use of `runtime.Object` have changed to
  `client.Object`, removing the requirement to e.g. call
  `runtime.Object#Object`.
- The `leader-election-role` was changed, as leader election now works
  via the `coordination/v1` API.

Other notable changes:

- `util.ObjectKey` was added to easily construct a `client.ObjectKey` /
  `types.NamespacedName` from a `metav1.Object`.

Signed-off-by: Hidde Beydals <[email protected]>
@hiddeco hiddeco force-pushed the controller-runtime-v0.7.0 branch from 7338b6c to e511cb8 Compare January 11, 2021 16:42
@hiddeco hiddeco merged commit 401f6a2 into main Jan 11, 2021
@hiddeco hiddeco deleted the controller-runtime-v0.7.0 branch January 11, 2021 17:18
seaneagan added a commit to seaneagan/helm-controller that referenced this pull request Jan 13, 2021
As of fluxcd#183 this is no longer needed.
seaneagan added a commit to seaneagan/helm-controller that referenced this pull request Jan 13, 2021
As of fluxcd#183 this is no longer needed.

Signed-off-by: Sean Eagan <[email protected]>
jtyr pushed a commit to jtyr/fluxcd-helm-controller that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants