Skip to content

Update module sigs.k8s.io/controller-runtime to v0.6.1#3417

Merged
pebrc merged 9 commits intomasterfrom
renovate/sigs.k8s.io-controller-runtime-0.x
Jul 16, 2020
Merged

Update module sigs.k8s.io/controller-runtime to v0.6.1#3417
pebrc merged 9 commits intomasterfrom
renovate/sigs.k8s.io-controller-runtime-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Jul 10, 2020

This PR contains the following updates:

Package Type Update Change
sigs.k8s.io/controller-runtime require minor v0.5.0 -> v0.6.1

Release Notes

kubernetes-sigs/controller-runtime

v0.6.1

Compare Source

Changes since v0.6.0

✨ New Features

  • Add webhook total and in-flight metrics (#​944)
  • Add Patch MergeFrom optimistic locking option (#​969)
  • Migrate controllerutil AddFinalizer and RemoveFinalizer to controllerutil.Object and deprecate *WithError functions (#​962)
  • Add ContainsFinalizer helper to the controllerutil (#​922)
  • Introduce controllerutil.Object interface (#​898)
  • Controller: Let sources sync even if they use a different cluster (#​941)
  • Manager: Export defaultNewClient (#​930)

🐛 Bug Fixes

  • Fix webhook example (#​1016)
  • Always shutdown etcd when stopping envtest (#​975)
  • fix(dependency) Use github.com/fsnotify/fsnotify (#​968)
  • Fix scheme used by DeleteAllOf in fake client (#​954)
  • Reset resource version if fake client Create call failed (#​919)
  • cannot specify ControlPlane in envtest.Environment (#​929)

📖 Documentation

  • Nit: improve doc string (#​987)
  • provide example of client.Patch (#​951)
  • Prevent errors to be logged multiple times in builtins example (#​953)

🌱 Others

  • Update json-patch dependency to e83c0a1 (#​985)
  • Clarify log line in apiutil.GVKForObject (#​1008)
  • Cleanup controller internal logger (#​1003)
  • Move pwittrock from emeritus approvers to approvers (#​997)
  • Remove unused attributes from controller (#​940)
  • Remove unsed Config attribute from controller (#​938)
  • [0.6] Update go.mod dependencies patch versions (v0.18.4) (#​1010)

Thanks to all our contributors! 😊

v0.6.0

Compare Source

v0.6.0

⚠️ Breaking Changes

  • Update Informers interface to accept context (#​830) — Impact: if you're using Informers methods directly, you'll need to pass a context.Context as first argument.
  • Add predicates as variadic args for Owns, For, and Watches func (#​799) — Impact: The methods signature have changed, now allow to pass in Options as variadic arguments.
  • Envtest: Do not disable admission plugins by default (#​848) — Impact: Tests using envtest might fail if an admission plugin rejects the action, users might need to change tests accordingly.
  • Fakeclient: Reject Update with outdated ResourceVersion (#​832) — Impact: Tests using an outdated ResourceVersion when using Update will now fail; this is expected behavior.
  • Fakeclient: Reject Create and Update if Name isn't provided (#​886) — Impact: Tests issuing Create/Update calls without a Name will now fail; this is expected behavior.
  • log/zap options Level and StacktraceLevel type (#​906)

✨ New Features

  • Add DryRunClient wrapper (#​839)
  • Allow controllers to be started and stopped separately from the manager (#​863)
  • Expose metrics http server for extra endpoints (#​824)

🐛 Bug Fixes

  • controllerutil.RemoveFinalizer can occurs slice bounds out of range exception (#​917)
  • Fix swapped constant value in webhook envtest (#​913)
  • Ensure KUBECONFIG is unset when testing GetConfigWithContext (#​909)
  • Fix CRD filtering in envtest package (#​902)
  • KubeAwareEncoder should handle unstructured object correctly (#​881)
  • Return original error from GetConfig (#​888)
  • MatchingLabels: Make sure requests with invalid labels fail (#​882)
  • Fix version check when reading webhooks from file (#​861)

Thanks to all our contributors!

v0.5.8

Compare Source

This is a maintenance release with bug fixes backported from release-0.6.

✨ New Features

  • Update dependencies to Kubernetes v0.17.8

v0.5.7

Compare Source

This is a maintenance release with bug fixes backported from release-0.6.

Changes since v0.5.6

🐛 Bug Fixes

  • Cannot specify ControlPlane in envtest.Environment (#​1002)
  • Always shutdown etcd when stopping envtest (#​975)

🌱 Others

  • Update go.mod dependencies patch versions (v0.17.7) (#​1009)
  • Cleanup controller internal logger (#​1003)
  • Update json-patch dependency to e83c0a1 (#​985)
  • Clarify log line in apiutil.GVKForObject (#​1008)
  • Nit: improve doc string (#​987)

Thanks to all our contributors! 😊

v0.5.6

Compare Source

This is a maintenance release with bug fixes backported from release-0.6.

✨ New Features

  • Add ContainsFinalizer helper to the controllerutil (#​922)

v0.5.5

Compare Source

This is a maintenance release with bug fixes backported from release-0.6.

✨ New Features

  • Add Patch MergeFrom optimistic locking option (#​973)

v0.5.4

Compare Source

This is a maintenance release with bug fixes backported from release-0.6.

✨ New Features

  • Controller: Let sources sync even if they use a different cluster (#​960)

v0.5.3

Compare Source

This is a maintenance release with bug fixes backported from release-0.6.

✨ New Features

  • Introduce controllerutil.Object interface (#​898)

🐛 Bug Fixes

  • controllerutil.RemoveFinalizer can occurs slice bounds out of range exception (#​917)
  • Fix swapped constant value in webhook envtest (#​913)
  • Fix CRD filtering in envtest package (#​902)
  • KubeAwareEncoder should handle unstructured object correctly (#​881)
  • Return original error from GetConfig (#​888)
  • MatchingLabels: Make sure requests with invalid labels fail (#​882)
  • Fix version check when reading webhooks from file (#​861)
  • Fix scheme used by DeleteAllOf in the fake client.

v0.5.2

Compare Source

v0.5.2

✨ New Features

  • Add helpers to configure logger options via pflags (#​767)

🐛 Bug Fixes

  • fix conservative delay in rate limiter (#​859)
  • expose DefaultKubeAPIServerFlags in envtest (#​846) -- fixes an accidental breaking change in envtest

Thanks to all our contributors!

v0.5.1

Compare Source

v0.5.1

✨ New Features

  • Add controllerutil.SetOwnerReference (#​816, #​844)
  • Take context when getting informer. (#​663)
  • Support restconfig to target the control plane (#​756)
  • Create a supported way of setting a cache on source.Kind (#​794)
  • Webhook support in envtest (#​787)
  • Enable webhook server set-up mTLS service to verify client's certificate (#​802)
  • Make workqueue rate limiter configurable during controller creation (#​731)

🐛 Bug Fixes

  • Fix testdata imports in pkg/webhook/conversion (#​843)
  • Respect context in unstructured client (#​812)
  • Fix informer cache creating pointers to pointers (#​796)
  • Use GenerateName during fake client's Create method (#​815)

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the >renovate PRs created by or relating to Renovate label Jul 10, 2020
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Jul 10, 2020

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻️ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you check the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: docker run --rm --name=renovate_go --label=renovate_child -v "/mnt/renovate/gh/elastic/cloud-on-k8s":"/mnt/renovate/gh/elastic/cloud-on-k8s" -v "/tmp/renovate-cache":"/tmp/renovate-cache" -v "/tmp/renovate-cache/others/go":"/tmp/renovate-cache/others/go" -e GOPATH -e CGO_ENABLED -w "/mnt/renovate/gh/elastic/cloud-on-k8s" renovate/go:1.13.12 bash -l -c "git config --global url.\"https://x-access-token:**redacted**@github.com/\".insteadOf \"https://github.com/\" && go get -d ./..."
go: k8s.io/api@v0.17.2 requires
	github.com/gogo/protobuf@v1.2.2-0.20190723190241-65acae22fc9d: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /tmp/renovate-cache/others/go/pkg/mod/cache/vcs/99185c7b086868ab9151c88ac8f43f57ac451b2fc4db786daa124e0e3868cc2d: exit status 128:
	fatal: unable to access 'https://github.com/gogo/protobuf/': gnutls_handshake() failed: Error in the pull function.

@renovate renovate bot force-pushed the renovate/sigs.k8s.io-controller-runtime-0.x branch from 9ff368c to 8652343 Compare July 10, 2020 20:37
@pebrc pebrc self-assigned this Jul 13, 2020
@anyasabo
Copy link
Copy Markdown
Contributor

anyasabo commented Jul 13, 2020

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:
kubernetes-sigs/controller-runtime#832
kubernetes-sigs/controller-runtime#886

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 force option. There's this WIP PR that hasn't been touched in months about making the fake client allow unconditional updates:
kubernetes-sigs/controller-runtime#926

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):
https://github.com/anyasabo/cloud-on-k8s/commits/updatedeps

pebrc added 7 commits July 15, 2020 14:05
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
@pebrc
Copy link
Copy Markdown
Collaborator

pebrc commented Jul 15, 2020

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:
kubernetes-sigs/controller-runtime#832
kubernetes-sigs/controller-runtime#886

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 FakeClient not longer supports unconditional upgrades I opted for always setting a ResourceVersion on upgrades by modifying the production code behaviour in 5dc1247

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.

@anyasabo
Copy link
Copy Markdown
Contributor

@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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@anyasabo anyasabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@pebrc pebrc added >enhancement Enhancement of existing functionality v1.3.0 and removed >renovate PRs created by or relating to Renovate labels Jul 16, 2020
@pebrc
Copy link
Copy Markdown
Collaborator

pebrc commented Jul 16, 2020

@elasticmachine run elasticsearch-ci/docs

@pebrc pebrc merged commit 6c0874c into master Jul 16, 2020
@renovate renovate bot deleted the renovate/sigs.k8s.io-controller-runtime-0.x branch July 16, 2020 15:27
@david-kow david-kow removed the v1.3.0 label Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement Enhancement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants