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

Bump openshift/api, controller runtime, and kube component versions #257

Conversation

sgreene570
Copy link
Contributor

@sgreene570 sgreene570 commented Apr 6, 2021

go.mod: Bump controller-runtime to v0.8.3

Support controller runtime v0.8.3

pkg/operator/controller/controller.go:
Use new context parameter in r.Reconcile(...).

pkg/operator/controller/status/controller.go:
Use new context parameter in r.Reconcile(...).

pkg/operator/operator.go:
Add custom manager.ClientBuilder type definition with custom methods to
specifically side-step the default client cache. Use a context in
o.Start, and replace the existing stop channel with ctx.Done().

cmd/dns-operator/main.go:
Update controller-runtime signals package import.

go.mod: Bump for kube 1.21 & controller-runtime v0.9.0-alpha

This commit consists of the following changes:

  • Bump openshift/api to commit 47be537 (current latest commit).
    openshift/api commit 2447417 moved openshift/api to kube 1.21,
    which inspired this commit. This commit is not strictly necessary
    at the moment, but will save us time when we need to pull in a new
    relevant API change in the future.

  • Bump controller runtime to v0.9.0-aplha.1. Controller runtime v0.8.x
    is currently incompatible with kubernetes 1.21.

  • Fix a breaking change in pkg/operator/operator.go introduced in
    controller runtime v0.9.0. Luckily this breaking change simplifies the
    manager workaround used for the version v0.8.3 bump.


This PR is similar to some of the commits in openshift/cluster-ingress-operator#589

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 6, 2021
@rfredette
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2021
@@ -79,14 +79,14 @@ func New(mgr manager.Manager, config operatorconfig.Config) (controller.Controll

// Reconcile computes the operator's current status and therefrom creates or
// updates the ClusterOperator resource for the operator.
func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) {
func (r *reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) {
nsManifest := manifests.DNSNamespace()

co := &configv1.ClusterOperator{ObjectMeta: metav1.ObjectMeta{Name: operatorcontroller.DNSClusterOperatorName().Name}}
if err := r.client.Get(context.TODO(), operatorcontroller.DNSClusterOperatorName(), co); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Missed one! We can get this in a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Darn!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This didnt make FF so might as well get it now.

@sgreene570
Copy link
Contributor Author

/retest

@sgreene570
Copy link
Contributor Author

/refresh

@sgreene570 sgreene570 force-pushed the openshift-api-controller-runtime-bump branch from 6d6bab1 to 48e0244 Compare April 9, 2021 18:35
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2021
pkg/operator/controller/controller.go:
Use new context parameter in `r.Reconcile(...)`.

pkg/operator/controller/status/controller.go:
Use new context parameter in `r.Reconcile(...)`.

pkg/operator/operator.go:
Add custom manager.ClientBuilder type definition with custom methods to
specifically side-step the default client cache. Use a context in
`o.Start`, and replace the existing stop channel with `ctx.Done()`.

cmd/dns-operator/main.go:
Update controller-runtime signals package import.
This commit consists of the following changes:

* Bump openshift/api to commit `47be537` (current latest commit).
  openshift/api commit `2447417` moved openshift/api to kube 1.21,
  which inspired this commit. This commit is not strictly necessary
  at the moment, but will save us time when we need to pull in a new
  relevant API change in the future.

* Bump controller runtime to v0.9.0-aplha.1. Controller runtime v0.8.x
  is currently incompatible with kubernetes 1.21.

* Fix a breaking change in `pkg/operator/operator.go` introduced in
  controller runtime v0.9.0. Luckily this breaking change simplifies the
  manager workaround used for the version v0.8.3 bump.
@sgreene570 sgreene570 force-pushed the openshift-api-controller-runtime-bump branch from 48e0244 to 84d040a Compare April 9, 2021 18:38
@rfredette
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rfredette, sgreene570

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:
  • OWNERS [rfredette,sgreene570]

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

@sgreene570
Copy link
Contributor Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 40dc6d2 into openshift:master Apr 9, 2021
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants