Update module sigs.k8s.io/controller-runtime to v0.6.1#3417
Conversation
|
9ff368c to
8652343
Compare
|
I couldn't remember where we discussed this before, so I'll write it down here for posterity. When I was upgrading to 0.6.0 there were two big changes that broke a lot of tests: One of the big changes was that the RV change made the fake client more strict than an actual API server. Many types allow "unconditional updates" with an empty RV, essentially a We mostly (only?) depend on this behavior in updating the usage configmap, which I think makes sense. We do not care what the previous content was when updating it. I was waiting on that PR to land before making further changes, but it's been so long and the change would be so minimal I think I'm okay with just changing the behavior so it can work with the fake client. My branch is here fixing a bunch of the tests if it's useful (or you can just assign this PR to me if you want): |
Mostly adjusting to the controller-runtime client taking a context obj as the first parameter now.
- always use names - requires ResourceVersion on update (more to fix here in following commits)
- set ResourceVersion in ReconcileResource to avoid unconditional updates - use ReconcileResource in licensing reporter
Namespaces are no longer implicitly created
I realised that this is still the case for 0.6.1. The main obstacle for upgrading comes from the first one: kubernetes-sigs/controller-runtime#832 as the I tried to keep the commit history somewhat clean as the PR is quite large (most of it is just regenerated CRDs though), so it should be possible to review commit by commit. |
|
@elasticmachine run elasticsearch-ci/docs |
| if err != nil { | ||
| return err | ||
| } | ||
| // retain the resource version to avoid unconditional updates as a work around for https://github.com/kubernetes-sigs/controller-runtime/pull/926 |
There was a problem hiding this comment.
I'd argue this is the right decision even without that fake client behavior. When deciding where or not to update (and creating the actual desired resource in UpdateReconciled), we are basing those decisions off of the state of the resource at that specific RV, so it makes sense to send that RV with the update and use the concurrency mechanisms k8s provides.
anyasabo
left a comment
There was a problem hiding this comment.
LGTM, though suggested a comment change. I also wonder if we want to change the labels on this so that it shows up in release notes as it is bumping our k8s deps and has user facing effects
|
@elasticmachine run elasticsearch-ci/docs |
This PR contains the following updates:
v0.5.0->v0.6.1Release Notes
kubernetes-sigs/controller-runtime
v0.6.1Compare Source
Changes since v0.6.0
✨ New Features
🐛 Bug Fixes
DeleteAllOfin fake client (#954)📖 Documentation
🌱 Others
e83c0a1(#985)Thanks to all our contributors! 😊
v0.6.0Compare Source
v0.6.0
context.Contextas first argument.ResourceVersionwhen usingUpdatewill now fail; this is expected behavior.Namewill now fail; this is expected behavior.✨ New Features
🐛 Bug Fixes
controllerutil.RemoveFinalizercan occurs slice bounds out of range exception (#917)Thanks to all our contributors!
v0.5.8Compare Source
This is a maintenance release with bug fixes backported from
release-0.6.✨ New Features
v0.5.7Compare Source
This is a maintenance release with bug fixes backported from
release-0.6.Changes since v0.5.6
🐛 Bug Fixes
🌱 Others
e83c0a1(#985)Thanks to all our contributors! 😊
v0.5.6Compare Source
This is a maintenance release with bug fixes backported from
release-0.6.✨ New Features
v0.5.5Compare Source
This is a maintenance release with bug fixes backported from
release-0.6.✨ New Features
v0.5.4Compare Source
This is a maintenance release with bug fixes backported from
release-0.6.✨ New Features
v0.5.3Compare Source
This is a maintenance release with bug fixes backported from
release-0.6.✨ New Features
controllerutil.Objectinterface (#898)🐛 Bug Fixes
controllerutil.RemoveFinalizercan occurs slice bounds out of range exception (#917)DeleteAllOfin the fake client.v0.5.2Compare Source
v0.5.2
✨ New Features
🐛 Bug Fixes
Thanks to all our contributors!
v0.5.1Compare Source
v0.5.1
✨ New Features
🐛 Bug Fixes
Thanks to all our contributors!
Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.