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

Merged
merged 4 commits into from
Jan 11, 2021
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Dec 17, 2020

This PR upgrades the controller-runtime dependency to v0.7.0, fix: #214.

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 client.MatchingField function was deprecated, and has been replaced with client.MatchingFields{}.
  • The leader-election-role was changed, as leader election now works via the coordination/v1 API.
  • The SourceIndexKey constant has been split out into {GitRepository,Bucket}IndexKey constants.
  • The util.ObjectKey was added to easily construct a client.ObjectKey / types.NamespacedName from a metav1.Object.

Impersonation changes:

Ref: fluxcd/flux2#613

controllers/kustomization_controller.go Outdated Show resolved Hide resolved
controllers/kustomization_controller.go Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@stefanprodan stefanprodan force-pushed the controller-runtime-update branch 2 times, most recently from 6e3ea57 to 5b81fb9 Compare December 18, 2020 08:21
@stefanprodan stefanprodan force-pushed the controller-runtime-update branch 4 times, most recently from 647561c to f291617 Compare December 18, 2020 10:40
@stefanprodan stefanprodan added the area/ci CI related issues and pull requests label Dec 18, 2020
@hiddeco hiddeco added the hold Issues and pull requests put on hold label Dec 18, 2020
@stefanprodan stefanprodan added the enhancement New feature or request label Dec 21, 2020
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan merged commit bb419bc into main Jan 11, 2021
@stefanprodan stefanprodan deleted the controller-runtime-update branch January 11, 2021 10:26
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 enhancement New feature or request hold Issues and pull requests put on hold
Projects
None yet
3 participants