Skip to content

Commit

Permalink
Upgrade deps with go 1.17 (#5505)
Browse files Browse the repository at this point in the history
* upgrades

* latest updates

* latest updates

* update .cncf-maintainers

* Update changelog/fragments/upgrades.yaml

Co-authored-by: Varsha <varshaprasad96@gmail.com>

Co-authored-by: Varsha <varshaprasad96@gmail.com>
  • Loading branch information
camilamacedo86 and varshaprasad96 committed Jan 19, 2022
1 parent b8e8b53 commit f950211
Show file tree
Hide file tree
Showing 44 changed files with 874 additions and 309 deletions.
3 changes: 1 addition & 2 deletions .cncf-maintainers
@@ -1,8 +1,8 @@
approvers:
- asmacdo
- camilamacedo86
- estroz
- fabianvf
- jberkhahn
- jmrodri
- joelanford
- marc-obrien
Expand All @@ -12,7 +12,6 @@ approvers:
reviewers:
- asmacdo
- camilamacedo86
- estroz
- fabianvf
- jberkhahn
- jmrodri
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
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
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
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
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
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
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
@@ -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/controller-gen@v0.7.0` with `sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0`
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
@@ -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

0 comments on commit f950211

Please sign in to comment.