-
Notifications
You must be signed in to change notification settings - Fork 21
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
Support Kubernetes v1.22 #85
Changes from all commits
9d14138
9a6e0a8
a96d087
9438e9c
b549e60
4d3826f
b853f98
289d4db
b16e5d0
ee65112
9ed5975
b088450
5208b84
1981530
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/bin | ||
/.vscode | ||
/.idea | ||
/testbin | ||
/vendor |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
Maintenance guide | ||
================= | ||
|
||
How to change the supported Kubernetes minor versions | ||
------------------------------------------- | ||
|
||
pvc-autoresizer depends on some Kubernetes repositories like `k8s.io/client-go` and should support 3 consecutive Kubernetes versions at a time. | ||
Issues and PRs related to the last upgrade task also help you understand how to upgrade the supported versions, | ||
so checking them together(e.g https://github.com/topolvm/pvc-autoresizer/pull/85) with this guide is recommended when you do this task. | ||
|
||
### Check release notes | ||
|
||
First of all, we should have a look at the release notes in the order below. | ||
|
||
1. TopoLVM | ||
- Choose the [TopoLVM](https://github.com/topolvm/topolvm/releases) version that supported target Kubernetes version. | ||
2. Kubernetes | ||
- Choose the next version and check the [release note](https://kubernetes.io/docs/setup/release/notes/). e.g. 1.17, 1.18, 1.19 -> 1.18, 1.19, 1.20 | ||
- Read the [release note](https://github.com/kubernetes-sigs/controller-runtime/releases), and check whether there are serious security fixes and whether the new minor version is compatible with older versions from the pvc-autoresizer's point of view. If there are breaking changes, we should decide how to manage these changes. | ||
- Read the [kubebuilder go.mod](https://github.com/kubernetes-sigs/kubebuilder/blob/master/go.mod), and check the controller-tools version corresponding to controller-runtime. | ||
3. Depending tools | ||
- They does not depend on other software, use latest versions. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's OK to use the latest versions of the following tools because these tools don't depend on each other. |
||
- [helm](https://github.com/helm/helm/releases) | ||
- [helm-docs](github.com/norwoodj/helm-docs/releases) | ||
- [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/releases) | ||
4. Depending modules | ||
- Read [kubernetes go.mod](https://github.com/kubernetes/kubernetes/blob/master/go.mod), and update the `prometheus/*` modules. | ||
|
||
We should write down in the github issue of this task what are the important changes and the required actions to manage incompatibilities if exist. | ||
The format is up to you. | ||
|
||
Basically, we should pay attention to breaking changes and security fixes first. | ||
|
||
### Update written versions | ||
|
||
We should also update the following files. | ||
|
||
- `README.md`: Documentation which indicates what versions are supported by pvc-autoresizer | ||
- `Makefile`: Makefile for running envtest | ||
- `e2e/Makefile`: Makefile for running e2e tests | ||
|
||
`git grep <the kubernetes version which support will be dropped>, `git grep image:`, and `git grep -i VERSION` might help to avoid overlooking necessary changes. | ||
|
||
### Update dependencies | ||
|
||
Next, we should update `go.mod` by the following commands. | ||
|
||
```bash | ||
$ VERSION=<upgrading Kubernetes release version> | ||
$ go get k8s.io/api@v${VERSION} k8s.io/apimachinery@v${VERSION} k8s.io/client-go@v${VERSION} | ||
``` | ||
|
||
If the new kubernetes version is v1.x.y", the new pvc-autoresizer's version will be v0.x.y. | ||
|
||
If we need to upgrade the `controller-runtime` version, do the following as well. | ||
|
||
```bash | ||
$ VERSION=<upgrading controller-runtime version> | ||
$ go get sigs.k8s.io/controller-runtime@v${VERSION} | ||
``` | ||
|
||
Then, please tidy up the dependencies. | ||
|
||
```bash | ||
$ go mod tidy | ||
``` | ||
|
||
These are minimal changes for the Kubernetes upgrade, but if there are some breaking changes found in the release notes, you have to handle them as well in this step. | ||
|
||
### Release the changes | ||
|
||
We should update [RELEASE.md](../RELEASE.md) to add the entry for the new pvc-autoresizer's version. | ||
|
||
### Prepare for the next upgrade | ||
|
||
We should create an issue for the next upgrade. Besides, Please update this document if we find something to be updated. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it mean the next to the next version? In other words, does the new issue for v1.24 if the new supported version is v1.23? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think so. This text is based on Topolvm maintenance.md. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,14 @@ go 1.16 | |
require ( | ||
github.com/go-logr/logr v0.4.0 | ||
github.com/onsi/ginkgo v1.16.4 | ||
github.com/onsi/gomega v1.13.0 | ||
github.com/onsi/gomega v1.17.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did you choose this version? I checked go.mod of csi-test following maintenance.md, and found csi-test is using ginkgo v1.14.2 and gomega v1.10.4. Or just updating to latest release is enough for this time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pvc-autoscaler isn't a CSI driver, so the pvc-autoscaler doesn't need dependent on the csi-test. So I maybe chose the latest release for ginkgo and gomega. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That means this instruction is not true for pvc-autoresizer? Or are there other version indications of ginkgo/gomega elsewhere other than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, sorry. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to apologize :) Thank you fixing. |
||
github.com/prometheus/client_golang v1.11.0 | ||
github.com/prometheus/client_model v0.2.0 | ||
github.com/prometheus/common v0.26.0 | ||
github.com/spf13/cobra v1.1.1 | ||
k8s.io/api v0.21.2 | ||
k8s.io/apimachinery v0.21.2 | ||
k8s.io/client-go v0.21.2 | ||
sigs.k8s.io/controller-runtime v0.9.2 | ||
github.com/spf13/cobra v1.2.1 | ||
k8s.io/api v0.22.4 | ||
k8s.io/apimachinery v0.22.4 | ||
k8s.io/client-go v0.22.4 | ||
sigs.k8s.io/controller-runtime v0.10.3 | ||
sigs.k8s.io/yaml v1.2.0 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Kubernetes 1.22.1 with envtest because envtest doesn't provide 1.22.4.