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

Upgrade deps with go 1.17 #5505

Merged
merged 5 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .cncf-maintainers
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
approvers:
- asmacdo
- camilamacedo86
- estroz
- fabianvf
- jberkhahn
Copy link
Member

Choose a reason for hiding this comment

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

Should this be done in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

- jmrodri
- joelanford
- marc-obrien
Expand All @@ -12,7 +12,6 @@ approvers:
reviewers:
- asmacdo
- camilamacedo86
- estroz
Copy link
Member

Choose a reason for hiding this comment

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

This too, in a separate PR maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure how this file is working but it is only updated because was falling in the sanity. I updated with the sanity to make it pass.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It shows that needs to be updated because of : https://github.com/operator-framework/operator-sdk/pull/5483/files.

- fabianvf
- jberkhahn
- jmrodri
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: install
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- name: gpg init
if: github.event_name != 'pull_request'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand All @@ -43,7 +43,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand All @@ -43,7 +43,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
id: go
- uses: actions/checkout@v2
with:
Expand Down
94 changes: 94 additions & 0 deletions changelog/fragments/upgrades.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
(go/v3) upgrade go version from 1.16 to 1.17 and the following dependencies:
- upgrade controller-runtime from `0.10.0` to `0.11.0`
- k8s from `1.22` to `1.23`
- controller-gen from `v0.0.7` to `v0.8.0`

# kind is one of:
# - addition
# - change
# - deprecation
# - removal
# - bugfix
kind: "change"

# Is this a breaking change?
breaking: false

# NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS
# FILE FOR A PREVIOUSLY MERGED PULL_REQUEST!
#
# The generator auto-detects the PR number from the commit
# message in which this file was originally added.
#
# What is the pull request number (without the "#")?
# pull_request_override: 0


# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: (go/v3) Upgrade go and dependencies
body: |
Upgrade controller-runtime from `0.10.0` to `0.11.0`, k8s from `1.22` to `1.23` and controller-gen from `v0.0.7` to `v0.8.0`.
Following the steps to update your project.
1) Update the go.mod file with:

```
go 1.17

require (
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
k8s.io/api v0.23.0
k8s.io/apimachinery v0.23.0
k8s.io/client-go v0.23.0
sigs.k8s.io/controller-runtime v0.11.0
)
```
2) Run `go mod tidy`

Now, let's update the Makefile targets accordingly:

1) Replace `ENVTEST_K8S_VERSION = 1.22` with `ENVTEST_K8S_VERSION = 1.23`
2) Replace `sigs.k8s.io/controller-tools/cmd/[email protected]` with `sigs.k8s.io/controller-tools/cmd/[email protected]`
3) Run `make manifests` and `make generate` to ensure that you will update your manifests with the new versions
4) You might want to run `make all` to ensure that all updates were done accordinly and succeffully
- description: >
The debug log level for the sidecar container kube-rbac-proxy was reduced from 10 to 0
kind: "change"
# Is this a breaking change?
breaking: false
# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: Reduce debug log level for the sidecar container kube-rbac-proxy from 10 to 0
body: |
Update the file `config/default/manager_auth_proxy_patch.yaml` by replacing `"--v=10"` with `"--v=0"`
- description: >
Add resource requests and limits to kube-rbac-proxy
kind: "addition"
# Is this a breaking change?
breaking: false
# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: Add resource requests and limits to kube-rbac-proxy
body: |
Update the file `config/default/manager_auth_proxy_patch.yaml` by adding:

```
...
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
```


20 changes: 20 additions & 0 deletions config/crd/bases/_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
spec:
group: ""
names:
kind: ""
plural: ""
scope: ""
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Loading