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

⚠️ Update dependencies to k8s 1.17 #795

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

vincepri
Copy link
Member

From the older PR: #754

This PR bumps controller-runtime to use Kubernetes 1.17 libraries, which will enable controller/operator developers to take advantage of the latest 1.17 client-go and API updates in their projects.

Due to an upstream change in k8s.io/api, there is one breaking change in controller-runtime's pkg/leaderelection/fake package, which is used only in pkg/manager/manager_test.go, at least internally. Should we deprecate this fake ResourceLock implementation from the public API and plan to move this into an internal tree?

Here's the notes and output from go-apidiff:

  • There's the one aforementioned breaking change in sigs.k8s.io/controller-runtime
  • As is expected with a version bump to the next major Kubernetes version, there are a raft of breaking API changes to libraries that controller-runtime imports and uses. For users of controller-runtime that also use these libraries, there may need to be code refactorings to address these breakages.
$ go-apidiff master k8s-1.17 --compare-imports

sigs.k8s.io/controller-runtime/pkg/leaderelection/fake
  Incompatible changes:
  - (*ResourceLock).Get: changed from func() (*k8s.io/client-go/tools/leaderelection/resourcelock.LeaderElectionRecord, error) to func() (*k8s.io/client-go/tools/leaderelection/resourcelock.LeaderElectionRecord, []byte, error)

k8s.io/client-go/kubernetes
  Incompatible changes:
  - Interface.DiscoveryV1beta1: added
  - Interface.FlowcontrolV1alpha1: added

github.com/onsi/ginkgo/config
  Incompatible changes:
  - VERSION: value changed from "1.8.0" to "1.10.1"

k8s.io/apimachinery/pkg/apis/meta/v1
  Incompatible changes:
  - Convert_Slice_string_To_v1_DeletionPropagation: removed

k8s.io/client-go/rest
  Incompatible changes:
  - (*Request).WatchWithSpecificDecoders: removed
  - NewRESTClient: changed from func(*net/url.URL, string, ContentConfig, float32, int, k8s.io/client-go/util/flowcontrol.RateLimiter, *net/http.Client) (*RESTClient, error) to func(*net/url.URL, string, ClientContentConfig, k8s.io/client-go/util/flowcontrol.RateLimiter, *net/http.Client) (*RESTClient, error)
  - NewRequest: changed from func(HTTPClient, string, *net/url.URL, string, ContentConfig, Serializers, BackoffManager, k8s.io/client-go/util/flowcontrol.RateLimiter, time.Duration) *Request to func(*RESTClient) *Request
  - RESTClient.Throttle: removed
  - Serializers: removed

github.com/prometheus/client_golang/prometheus
  Incompatible changes:
  - DefObjectives: removed
  - Handler: removed
  - InstrumentHandler: removed
  - InstrumentHandlerFunc: removed
  - InstrumentHandlerFuncWithOpts: removed
  - InstrumentHandlerWithOpts: removed
  - UninstrumentedHandler: removed

k8s.io/client-go/tools/leaderelection/resourcelock
  Incompatible changes:
  - (*ConfigMapLock).Get: changed from func() (*LeaderElectionRecord, error) to func() (*LeaderElectionRecord, []byte, error)
  - (*EndpointsLock).Get: changed from func() (*LeaderElectionRecord, error) to func() (*LeaderElectionRecord, []byte, error)
  - (*LeaseLock).Get: changed from func() (*LeaderElectionRecord, error) to func() (*LeaderElectionRecord, []byte, error)
  - Interface.Get: changed from func() (*LeaderElectionRecord, error) to func() (*LeaderElectionRecord, []byte, error)

k8s.io/apimachinery/pkg/labels
  Incompatible changes:
  - Selector.RequiresExactMatch: added

k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
  Incompatible changes:
  - JSONFallbackEncoder: removed

github.com/onsi/ginkgo
  Incompatible changes:
  - GINKGO_VERSION: value changed from "1.8.0" to "1.10.1"

k8s.io/api/core/v1
  Incompatible changes:
  - NodeSpec.DoNotUse_ExternalID: removed

k8s.io/client-go/tools/record
  Incompatible changes:
  - EventBroadcaster.Shutdown: added

k8s.io/apimachinery/pkg/runtime
  Incompatible changes:
  - Encoder.Identifier: added
  - GroupVersioner.Identifier: added
  - GroupVersioners: removed
  - VersionedObjects: removed

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 10, 2020
1. kubernetes/client-go@fed41f5

   This client-go commit is a refactoring that changes how the
   client and server negotiate the content type and decoder.

   As a result of this refactoring, controller-runtime's
   recorder_test has a broken assumption for causing an error
   creating the client. Therefore, this commit updates the recorder
   test to use an invalid host, which causes the client to fail in
   the same way as before, ensuring the test continues to pass.

2. kubernetes/client-go@ba49d2a

   This client-go commit is a breaking change to
   resourcelock.Interface.

   As a result of this change, controller-runtime's fake
   ResourceLock implementation needed to be updated to account for
   the interface change.

Signed-off-by: Vince Prignano <vincepri@vmware.com>
@vincepri
Copy link
Member Author

Made sure to use @joelanford older commits for attribution, this should be good to go!

/assign @DirectXMan12 @gerred

@vincepri
Copy link
Member Author

/retest

@joelanford
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 10, 2020
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

/lgtm

@DirectXMan12
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, vincepri

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2020
@k8s-ci-robot k8s-ci-robot merged commit c38f59a into kubernetes-sigs:master Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants