From 306e2f7d7698510143c7a7e14951b28cebe4b43e Mon Sep 17 00:00:00 2001 From: Jan Martens Date: Sun, 1 Dec 2024 23:42:38 +0100 Subject: [PATCH] update tested kubernetes versions To include all versions which are currently not EOL: - 1.29 - 1.30 - 1.31 Signed-off-by: Jan Martens --- .github/workflows/acceptance.yaml | 2 +- README.md | 2 +- charts/openbao/README.md | 2 +- test/unit/injector-disruptionbudget.bats | 11 ------ test/unit/server-ha-disruptionbudget.bats | 12 ------- test/unit/server-ingress.bats | 41 ----------------------- test/unit/server-statefulset.bats | 35 ------------------- 7 files changed, 3 insertions(+), 102 deletions(-) diff --git a/.github/workflows/acceptance.yaml b/.github/workflows/acceptance.yaml index 9dec300cc..fbf3dad9d 100644 --- a/.github/workflows/acceptance.yaml +++ b/.github/workflows/acceptance.yaml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - kind-k8s-version: [1.27.11, 1.28.7, 1.29.2] + kind-k8s-version: [1.29.11, 1.30.7, 1.31.3] runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 diff --git a/README.md b/README.md index 69c3aa845..fc42c0f65 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ this README. Please refer to the Kubernetes and Helm documentation. The versions required are: * **Helm 3.12+** - Earliest verison tested - * **Kubernetes 1.28+** - This is the earliest version of Kubernetes tested. + * **Kubernetes 1.29+** - This is the earliest version of Kubernetes tested. It is possible that this chart works with earlier versions but it is untested. diff --git a/charts/openbao/README.md b/charts/openbao/README.md index 84b8e02fd..23184207d 100644 --- a/charts/openbao/README.md +++ b/charts/openbao/README.md @@ -18,7 +18,7 @@ Official OpenBao Chart ## Requirements -Kubernetes: `>= 1.27.0-0` +Kubernetes: `>= 1.29.0-0` ## Values diff --git a/test/unit/injector-disruptionbudget.bats b/test/unit/injector-disruptionbudget.bats index a7af87117..8d2488681 100755 --- a/test/unit/injector-disruptionbudget.bats +++ b/test/unit/injector-disruptionbudget.bats @@ -49,14 +49,3 @@ load _helpers yq '.spec.maxUnavailable == 3' | tee /dev/stderr) [ "${actual}" = "true" ] } - -@test "injector/DisruptionBudget: apiVersion is set correctly >= version 1.21 of kube" { - cd `chart_dir` - local actual=$(helm template \ - --show-only templates/injector-disruptionbudget.yaml \ - --set 'injector.podDisruptionBudget.minAvailable=2' \ - --kube-version 1.27.5 \ - . | tee /dev/stderr | - yq '.apiVersion == "policy/v1"' | tee /dev/stderr) - [ "${actual}" = "true" ] -} diff --git a/test/unit/server-ha-disruptionbudget.bats b/test/unit/server-ha-disruptionbudget.bats index 073214994..583fd21bf 100755 --- a/test/unit/server-ha-disruptionbudget.bats +++ b/test/unit/server-ha-disruptionbudget.bats @@ -116,15 +116,3 @@ load _helpers yq '.spec.maxUnavailable' | tee /dev/stderr) [ "${actual}" = "2" ] } - -@test "server/DisruptionBudget: apiVersion is set correctly >= version 1.21 of kube" { - cd `chart_dir` - local actual=$(helm template \ - --show-only templates/server-disruptionbudget.yaml \ - --set 'server.ha.enabled=true' \ - --set 'server.ha.replicas=1' \ - --kube-version 1.27.5 \ - . | tee /dev/stderr | - yq '.apiVersion == "policy/v1"' | tee /dev/stderr) - [ "${actual}" = "true" ] -} diff --git a/test/unit/server-ingress.bats b/test/unit/server-ingress.bats index 11b137c4e..9dd2c8cd2 100755 --- a/test/unit/server-ingress.bats +++ b/test/unit/server-ingress.bats @@ -216,21 +216,6 @@ load _helpers [ "${actual}" = "release-name-openbao" ] } -@test "server/ingress: k8s 1.27.0 uses correct service format when not ha - yaml" { - cd `chart_dir` - - local actual=$(helm template \ - --show-only templates/server-ingress.yaml \ - --set 'server.ingress.enabled=true' \ - --set 'server.dev.enabled=false' \ - --set 'server.ha.enabled=false' \ - --set 'server.service.enabled=true' \ - --kube-version 1.27.0 \ - . | tee /dev/stderr | - yq -r '.spec.rules[0].http.paths[0].backend.service.name' | tee /dev/stderr) - [ "${actual}" = "release-name-openbao" ] -} - @test "server/ingress: uses regular service when not ha and activeService is true - yaml" { cd `chart_dir` @@ -245,29 +230,3 @@ load _helpers yq -r '.spec.rules[0].http.paths[0].backend.service.name' | tee /dev/stderr) [ "${actual}" = "release-name-openbao" ] } - -@test "server/ingress: pathType is added to Kubernetes version == 1.27.0" { - cd `chart_dir` - - local actual=$(helm template \ - --show-only templates/server-ingress.yaml \ - --set 'server.ingress.enabled=true' \ - --set server.ingress.pathType=ImplementationSpecific \ - --kube-version 1.27.0 \ - . | tee /dev/stderr | - yq -r '.spec.rules[0].http.paths[0].pathType' | tee /dev/stderr) - [ "${actual}" = "ImplementationSpecific" ] -} - -@test "server/ingress: pathType is added to Kubernetes versions > 1.19" { - cd `chart_dir` - - local actual=$(helm template \ - --show-only templates/server-ingress.yaml \ - --set 'server.ingress.enabled=true' \ - --set server.ingress.pathType=Prefix \ - --kube-version 1.27.0 \ - . | tee /dev/stderr | - yq -r '.spec.rules[0].http.paths[0].pathType' | tee /dev/stderr) - [ "${actual}" = "Prefix" ] -} diff --git a/test/unit/server-statefulset.bats b/test/unit/server-statefulset.bats index aafd92d55..9a4bf3ef9 100755 --- a/test/unit/server-statefulset.bats +++ b/test/unit/server-statefulset.bats @@ -221,41 +221,6 @@ load _helpers [ "${actual}" = "OnDelete" ] } -#-------------------------------------------------------------------- -# persistentVolumeClaimRetentionPolicy - -@test "server/standalone-StatefulSet: persistentVolumeClaimRetentionPolicy not set by default when kubernetes >= 1.23" { - cd `chart_dir` - local actual=$(helm template \ - -s templates/server-statefulset.yaml \ - --kube-version "1.27" \ - . | tee /dev/stderr | - yq -r '.spec.persistentVolumeClaimRetentionPolicy' | tee /dev/stderr) - [ "${actual}" = "null" ] -} - -@test "server/standalone-StatefulSet: can set persistentVolumeClaimRetentionPolicy.whenDeleted when kubernetes >= 1.23" { - cd `chart_dir` - local actual=$(helm template \ - -s templates/server-statefulset.yaml \ - --kube-version "1.27" \ - --set 'server.persistentVolumeClaimRetentionPolicy.whenDeleted=Delete' \ - . | tee /dev/stderr | - yq -r '.spec.persistentVolumeClaimRetentionPolicy.whenDeleted' | tee /dev/stderr) - [ "${actual}" = "Delete" ] -} - -@test "server/standalone-StatefulSet: can set persistentVolumeClaimRetentionPolicy.whenScaled when kubernetes >= 1.23" { - cd `chart_dir` - local actual=$(helm template \ - -s templates/server-statefulset.yaml \ - --kube-version "1.27" \ - --set 'server.persistentVolumeClaimRetentionPolicy.whenScaled=Delete' \ - . | tee /dev/stderr | - yq -r '.spec.persistentVolumeClaimRetentionPolicy.whenScaled' | tee /dev/stderr) - [ "${actual}" = "Delete" ] -} - #-------------------------------------------------------------------- # replicas