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 go to k8s 1.21 #1209

Merged
merged 3 commits into from
Feb 8, 2022
Merged

Bump go to k8s 1.21 #1209

merged 3 commits into from
Feb 8, 2022

Conversation

qinqon
Copy link
Collaborator

@qinqon qinqon commented Feb 4, 2022

What this PR does / why we need it:
There are security warnings on the project, they can be fixed bumping go deps to k8s 1.21.

Special notes for your reviewer:

Release note:

Bump go deps:
- k8s 1.21.9 
- controller-runtime 0.8.7

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Feb 4, 2022
@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2022
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2022
There are security warnings on the project that can be fixed bumping k8s
go deps. This change bump k8s, controller-runtime, controller-tools and
operator-sdk.

Signed-off-by: Quique Llorente <ellorent@redhat.com>
The new controller-runtime expect a context.Context on the Reconcile
interface. This change add that to the controllers.

Signed-off-by: Quique Llorente <ellorent@redhat.com>
@qinqon qinqon force-pushed the bump-go-to-k8s-1.21 branch 6 times, most recently from 4217914 to 86c0cae Compare February 7, 2022 12:03
The operator-sdk 1.y.z introduced backward imcompatible changes:
- The "test" package no longer exists and we have to use testenv
- The operator-sdk generate does not exist and we have to sue
  controller-gen
- The generated code is different and we have to adapt to it.

Signed-off-by: Quique Llorente <ellorent@redhat.com>

gen: Use controller-gen to generate k8s code

Signed-off-by: Quique Llorente <ellorent@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@rhrazdil rhrazdil left a comment

Choose a reason for hiding this comment

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

Followed operator-sdk upgrade doc and all changes are aligned witht the docs
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2022
@qinqon
Copy link
Collaborator Author

qinqon commented Feb 8, 2022

/approve

@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qinqon

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2022
@kubevirt-bot kubevirt-bot merged commit a34d9d5 into kubevirt:main Feb 8, 2022
@RamLavi
Copy link
Collaborator

RamLavi commented Mar 29, 2022

/cherry-pick release-0.65

@kubevirt-bot
Copy link
Collaborator

@RamLavi: #1209 failed to apply on top of branch "release-0.65":

Applying: deps: Bump go to k8s 1.21
.git/rebase-apply/patch:14731: trailing whitespace.
          codeCoverageTool: Cobertura 
.git/rebase-apply/patch:15005: trailing whitespace.
### Changed 
.git/rebase-apply/patch:16784: trailing whitespace.
We also ask that contributors [sign their commits](https://git-scm.com/docs/git-commit) using `git commit -s` or `git commit --signoff` to certify they either authored the work themselves or otherwise have permission to use it in this project. 
.git/rebase-apply/patch:23678: trailing whitespace.
 
.git/rebase-apply/patch:45907: trailing whitespace.
Structure `jsonpatch.ApplyOptions` includes the configuration options above 
error: patch failed: vendor/github.com/gophercloud/gophercloud/CHANGELOG.md:1
error: vendor/github.com/gophercloud/gophercloud/CHANGELOG.md: patch does not apply
error: patch failed: vendor/github.com/mitchellh/copystructure/README.md:1
error: vendor/github.com/mitchellh/copystructure/README.md: patch does not apply
error: patch failed: vendor/github.com/pelletier/go-toml/example-crlf.toml:27
error: vendor/github.com/pelletier/go-toml/example-crlf.toml: patch does not apply
error: patch failed: vendor/github.com/sirupsen/logrus/appveyor.yml:1
error: vendor/github.com/sirupsen/logrus/appveyor.yml: patch does not apply
error: patch failed: vendor/github.com/spf13/afero/.travis.yml:1
error: vendor/github.com/spf13/afero/.travis.yml: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Using index info to reconstruct a base tree...
M	go.mod
M	vendor/modules.txt
Patch failed at 0001 deps: Bump go to k8s 1.21
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.65

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

rhrazdil pushed a commit to rhrazdil/cluster-network-addons-operator that referenced this pull request Mar 29, 2022
* deps: Bump go to k8s 1.21

There are security warnings on the project that can be fixed bumping k8s
go deps. This change bump k8s, controller-runtime, controller-tools and
operator-sdk.

Signed-off-by: Quique Llorente <ellorent@redhat.com>

* controller: Adapt to controller-runtime version

The new controller-runtime expect a context.Context on the Reconcile
interface. This change add that to the controllers.

Signed-off-by: Quique Llorente <ellorent@redhat.com>

* deps: Adapt to v1.y.z version of operator-sdk

The operator-sdk 1.y.z introduced backward imcompatible changes:
- The "test" package no longer exists and we have to use testenv
- The operator-sdk generate does not exist and we have to sue
  controller-gen
- The generated code is different and we have to adapt to it.

Signed-off-by: Quique Llorente <ellorent@redhat.com>

gen: Use controller-gen to generate k8s code

Signed-off-by: Quique Llorente <ellorent@redhat.com>
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants