-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Camila Macedo <cmacedo@redhat.com>
- Loading branch information
Camila Macedo
committed
Sep 21, 2021
1 parent
19750cd
commit e103eee
Showing
36 changed files
with
653 additions
and
463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# entries is a list of entries to include in | ||
# release notes and/or the migration guide | ||
entries: | ||
- description: > | ||
- Upgrade the Kubernetes dependencies from `1.21` to `1.22`. | ||
- Upgrade the controller-gen dependency from `v0.6.2` to `v0.7.0`. More info: https://github.com/kubernetes-sigs/controller-tools/releases | ||
- Upgrade the sigs.k8s.io/controller-runtime dependency from `v0.9.2` to `v0.10.0`. More info: https://github.com/kubernetes-sigs/controller-runtime/releases | ||
- Upgrade the Env Test used from `1.21` to `1.22`. | ||
# 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: Upgrade K8s versions to use 1.22 (golang/v3) | ||
body: > | ||
Note that to ensure the backwords compatibility SDK tool will try to downgrade the versions used if you need to still scaffolding the v1beta1 for CRDs and Webhooks to pusblish your solutions into the old cluster versions. | ||
However, note that this versions are no longer supported on Kubernetes 1.22+, and for sigs.k8s.io/controller-runtime v0.10.0 or controller-gen v0.7.0. | ||
Following the changes to be addressed to your Makefile and go.mod file if you are | ||
not using the `v1beta1` K8s APIs which are no longer supported from k8s `1.22` version. | ||
1) Update your `go.mod` file to upgrade the dependencies and run `go mod tidy` to download then | ||
```go | ||
k8s.io/api v0.22.1 | ||
k8s.io/apimachinery v0.22.1 | ||
k8s.io/client-go v0.22.1 | ||
sigs.k8s.io/controller-runtime v0.10.0 | ||
``` | ||
2) Update your Makafile by | ||
- Replacing `ENVTEST_K8S_VERSION = 1.21` with `ENVTEST_K8S_VERSION = 1.22` | ||
- Replacing `$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases` with `$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases` | ||
- Now, you can also remove from this file | ||
``` | ||
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) | ||
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" | ||
``` | ||
3) Replace your markers `admissionReviewVersions={v1,v1beta1}` with `admissionReviewVersions=v1` | ||
4) Run `make manifest` to re-generate your manifests with latest versions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.