Skip to content

Commit

Permalink
[CON-7035] Update CSI driver for Kubernetes 1.24 (#457)
Browse files Browse the repository at this point in the history
* update k8s dependencies to support k8s 1.24.x

make NEW_KUBERNETES_VERSION=1.24.3 update-k8s

* test(e2e): add support for kubernetes 1.24

* add caching for 1.24 docker builds

* explicitly disable currently unsupported capabilities in e2e tests

* update version file

* remove 1.21 e2e tests

* "Revert "Temporarily disable [Feature:VolumeSourceXFS] tests"""

Since we removed tested support for 1.21 these tests can be re-enabled.
This reverts commit ff8c40d.

* remove tests 1.21 for github workflows

* Revert ""Revert "Temporarily disable [Feature:VolumeSourceXFS] tests""""

This reverts commit 24c8eb9.

* docs: add section on how to prepare csi driver for a new k8s minor version

* docs: remove upstream release information

Co-authored-by: Moritz Rieger <[email protected]>
  • Loading branch information
mo-rieger and mo-rieger authored Aug 24, 2022
1 parent 2d5549f commit deabd55
Show file tree
Hide file tree
Showing 165 changed files with 9,260 additions and 5,281 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
run: |
BRANCH=$(echo -n ${BRANCH} | tr -c '[:alnum:]._-' '-')
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${DOCKER_USER}'", "password": "'${DOCKER_PASS}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
images=("${BRANCH}-latest" "${BRANCH}-runtime" "${BRANCH}-tools" "${BRANCH}-tests-1.23" "${BRANCH}-tests-1.22" "${BRANCH}-tests-1.21" "${BRANCH}-builder")
images=("${BRANCH}-latest" "${BRANCH}-runtime" "${BRANCH}-tools" "${BRANCH}-tests-1.24" "${BRANCH}-tests-1.23" "${BRANCH}-tests-1.22" "${BRANCH}-builder")
for i in ${images[*]}; do curl --fail -sS -X DELETE -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/digitalocean/k8s-e2e-test-runner/tags/$i/; done
curl --fail -sS -X DELETE -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/digitalocean/do-csi-plugin-dev/tags/${BRANCH}/
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
needs: push-images
strategy:
matrix:
kube-release: ['1.23', '1.22', '1.21']
kube-release: ['1.24', '1.23', '1.22']

steps:
- name: checkout
Expand Down
44 changes: 22 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ifneq ($(VERSION),)
else
VERSION ?= $(shell cat VERSION)
endif
KUBERNETES_VERSION ?= 1.21.6
KUBERNETES_VERSION ?= 1.24.3
DOCKER_REPO ?= digitalocean/do-csi-plugin
CANONICAL_RUNNER_IMAGE = digitalocean/k8s-e2e-test-runner
RUNNER_IMAGE ?= $(CANONICAL_RUNNER_IMAGE)
Expand Down Expand Up @@ -125,12 +125,12 @@ runner-build:
@echo "pulling cache images"
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder || true
@docker pull $(CANONICAL_RUNNER_IMAGE):builder || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tests-1.24 || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tests-1.23 || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22 || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tests-1.22 || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.21 || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tests-1.21 || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tools || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime || true
Expand All @@ -145,10 +145,20 @@ runner-build:
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder -f test/e2e/Dockerfile test/e2e


@echo "building target tests-1.24"
@docker build --target tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 -f test/e2e/Dockerfile test/e2e

@echo "building target tests-1.23"
@docker build --target tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 -f test/e2e/Dockerfile test/e2e
Expand All @@ -157,34 +167,24 @@ runner-build:
@docker build --target tests-1.22 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.22 \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22 -f test/e2e/Dockerfile test/e2e

@echo "building target tests-1.21"
@docker build --target tests-1.21 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.22 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.21 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.21 \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.21 -f test/e2e/Dockerfile test/e2e

@echo "building target tools"
@docker build --target tools \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.22 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.21 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.21 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools \
--cache-from $(CANONICAL_RUNNER_IMAGE):tools \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools -f test/e2e/Dockerfile test/e2e
Expand All @@ -193,12 +193,12 @@ runner-build:
@docker build --target runtime \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.22 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.21 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.21 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools \
--cache-from $(CANONICAL_RUNNER_IMAGE):tools \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime \
Expand All @@ -209,12 +209,12 @@ runner-build:
@docker build \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.22 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.21 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.21 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools \
--cache-from $(CANONICAL_RUNNER_IMAGE):tools \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime \
Expand All @@ -225,9 +225,9 @@ runner-build:

runner-push: runner-build
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.22
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.21
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)latest
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ The following table describes the required DigitalOcean CSI driver version per s
| 1.21 | v3 |
| 1.22 | v4 |
| 1.23 | v4.2.0+ |
| 1.24 | v4.3.0+ |

---
**Note:**
Expand Down Expand Up @@ -357,7 +358,19 @@ There is a set of custom integration tests which are mostly useful for Kubernete

To run the integration tests on a DOKS cluster, follow [the instructions](test/kubernetes/deploy/README.md).

## Updating the Kubernetes dependencies
## Prepare CSI driver for a new Kubernetes minor version

1. Review recently merged PRs and any in-progress / planned work to ensure any bugs scheduled for the release have been fixed and merged.
2. [Bump kubernetes dependency versions](#updating-the-kubernetes-dependencies)
3. [Support running e2e on new $MAJOR.$MINOR](test/e2e/README.md#add-support-for-a-new-kubernetes-release)
1. Since we only support three minor versions at a time. E2e tests for the oldest supported version can be removed.
4. Verify [e2e tests pass](.github/workflows/test.yaml) - see [here](#end-to-end-tests) about running tests locally
5. Prepare for [release](#releasing)
6. Perform [release](.github/workflows/release.yaml)

> See [e2e test README](test/e2e/README.md) on how to run conformance tests locally.

### Updating the Kubernetes dependencies

Run

Expand All @@ -367,7 +380,9 @@ make NEW_KUBERNETES_VERSION=X.Y.Z update-k8s

to update the Kubernetes dependencies to version X.Y.Z.

## Releasing
> Note: Make sure to also add support to the e2e tests for the new kubernetes version, following [these instructions](test/e2e/README.md#add-support-for-a-new-kubernetes-release).

### Releasing

Releases may happen either for the latest minor version of the CSI driver maintained in the `master` branch, or an older minor version still maintained in one of the `release-*` branches. In this section, we will call that branch the _release branch_.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.2.0
v4.3.0
62 changes: 31 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ require (
github.com/kubernetes-csi/csi-test/v4 v4.3.0
github.com/magiconair/properties v1.8.5
github.com/sirupsen/logrus v1.8.1
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
golang.org/x/sys v0.0.0-20220209214540-3681064d5158
google.golang.org/grpc v1.40.0
k8s.io/apimachinery v0.23.7
k8s.io/apimachinery v0.24.3
k8s.io/mount-utils v0.23.7
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
)
Expand All @@ -40,63 +40,63 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
)

replace k8s.io/api => k8s.io/api v0.23.7
replace k8s.io/api => k8s.io/api v0.24.3

replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.7
replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.3

replace k8s.io/apimachinery => k8s.io/apimachinery v0.23.9-rc.0
replace k8s.io/apimachinery => k8s.io/apimachinery v0.24.4-rc.0

replace k8s.io/apiserver => k8s.io/apiserver v0.23.7
replace k8s.io/apiserver => k8s.io/apiserver v0.24.3

replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.7
replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.3

replace k8s.io/client-go => k8s.io/client-go v0.23.7
replace k8s.io/client-go => k8s.io/client-go v0.24.3

replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.7
replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.3

replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.7
replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.3

replace k8s.io/code-generator => k8s.io/code-generator v0.23.9-rc.0
replace k8s.io/code-generator => k8s.io/code-generator v0.24.4-rc.0

replace k8s.io/component-base => k8s.io/component-base v0.23.7
replace k8s.io/component-base => k8s.io/component-base v0.24.3

replace k8s.io/component-helpers => k8s.io/component-helpers v0.23.7
replace k8s.io/component-helpers => k8s.io/component-helpers v0.24.3

replace k8s.io/controller-manager => k8s.io/controller-manager v0.23.7
replace k8s.io/controller-manager => k8s.io/controller-manager v0.24.3

replace k8s.io/cri-api => k8s.io/cri-api v0.23.9-rc.0
replace k8s.io/cri-api => k8s.io/cri-api v0.25.0-alpha.0

replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.7
replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.3

replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.7
replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.3

replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.7
replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.3

replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.7
replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.3

replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.7
replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.3

replace k8s.io/kubectl => k8s.io/kubectl v0.23.7
replace k8s.io/kubectl => k8s.io/kubectl v0.24.3

replace k8s.io/kubelet => k8s.io/kubelet v0.23.7
replace k8s.io/kubelet => k8s.io/kubelet v0.24.3

replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.7
replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.3

replace k8s.io/metrics => k8s.io/metrics v0.23.7
replace k8s.io/metrics => k8s.io/metrics v0.24.3

replace k8s.io/mount-utils => k8s.io/mount-utils v0.23.9-rc.0
replace k8s.io/mount-utils => k8s.io/mount-utils v0.24.4-rc.0

replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.7
replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.3

replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.7
replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.3
Loading

0 comments on commit deabd55

Please sign in to comment.