From 674d15b718528936a697bce2f38ebb43df756397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Eichhorn?= Date: Mon, 2 Jan 2023 21:48:23 +0100 Subject: [PATCH] chore: update k8s client from 23.6.0 to 25.3.0 and also adapt tested k8s versions to kind version --- .github/workflows/build_and_test.yaml | 36 ++++++++++++++++----------- README.md | 1 + src/requirements.txt | 2 +- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 3d30c7f..523af2e 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -31,28 +31,34 @@ jobs: - build strategy: matrix: + # see https://github.com/kubernetes-sigs/kind/releases for supported k8s versions per kind version k8s: - [ - v1.14.10, - v1.15.12, - v1.16.15, - v1.17.17, - v1.18.19, - v1.19.11, - v1.20.7, - v1.21.2, - v1.22.5, - v1.23.3, - ] - name: "Test on k8s ${{ matrix.k8s }}" + - maj_min: v1.19 + digest: sha256:476cb3269232888437b61deca013832fee41f9f074f9bed79f57e4280f7c48b7 + - maj_min: v1.20 + digest: sha256:a32bf55309294120616886b5338f95dd98a2f7231519c7dedcec32ba29699394 + - maj_min: v1.21 + digest: sha256:9d9eb5fb26b4fbc0c6d95fa8c790414f9750dd583f5d7cee45d92e8c26670aa1 + - maj_min: v1.22 + digest: sha256:7d9708c4b0873f0fe2e171e2b1b7f45ae89482617778c1c875f1053d4cef2e41 + - maj_min: v1.23 + digest: sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61 + - maj_min: v1.24 + digest: sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315 + - maj_min: v1.25 + digest: sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1 + - maj_min: v1.26 + digest: sha256:691e24bd2417609db7e589e1a479b902d2e209892a10ce375fab60a8407c7352 + name: "Test on k8s ${{ matrix.k8s.maj_min }}" runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Create k8s Kind Cluster + # make sure the k8s versions match the kind version of the action version 🤯 uses: helm/kind-action@v1.5.0 with: - node_image: kindest/node:${{ matrix.k8s }} + node_image: kindest/node@${{ matrix.k8s.digest }} config: test/kind-config.yaml cluster_name: sidecar-testing wait: 5m @@ -179,4 +185,4 @@ jobs: kubectl exec sidecar -- sh -c "! test -e /tmp/cm-kubelogo.png" && kubectl exec sidecar -- sh -c "test -e /tmp/change-cm-kubelogo.png" && kubectl exec sidecar -- sh -c "! test -e /tmp/secret-kubelogo.png" && kubectl exec sidecar -- sh -c "test -e /tmp/change-secret-kubelogo.png" && kubectl exec sidecar -- sh -c "! test -e /tmp/absolute/absolute.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/absolute/change-absolute.txt" && - kubectl exec sidecar -- sh -c "! test -e /tmp/relative/relative.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/relative/change-relative.txt" + kubectl exec sidecar -- sh -c "! test -e /tmp/relative/relative.txt" && kubectl exec sidecar -- sh -c "test -e /tmp/relative/change-relative.txt" \ No newline at end of file diff --git a/README.md b/README.md index 8e0fc3a..26ad7bd 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Both are identical multi-arch images built for `amd64`, `arm64`, `arm/v7`, `ppc6 - Filter based on label - Update/Delete on change of configmap or secret - Enforce unique filenames +- CI tests for k8s v1.19-v1.26 # Usage diff --git a/src/requirements.txt b/src/requirements.txt index adfa7cd..2a0361b 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,4 +1,4 @@ -kubernetes==23.6.0 +kubernetes==25.3.0 requests==2.28.1 python-json-logger==2.0.4 logfmter==0.0.6 \ No newline at end of file