Skip to content

Commit

Permalink
update tested kubernetes versions
Browse files Browse the repository at this point in the history
To include all versions which are currently not EOL:

- 1.29
- 1.30
- 1.31

Signed-off-by: Jan Martens <[email protected]>
  • Loading branch information
JanMa committed Dec 1, 2024
1 parent 60e37ba commit 306e2f7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/acceptance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion charts/openbao/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Official OpenBao Chart

## Requirements

Kubernetes: `>= 1.27.0-0`
Kubernetes: `>= 1.29.0-0`

## Values

Expand Down
11 changes: 0 additions & 11 deletions test/unit/injector-disruptionbudget.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
12 changes: 0 additions & 12 deletions test/unit/server-ha-disruptionbudget.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
41 changes: 0 additions & 41 deletions test/unit/server-ingress.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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" ]
}
35 changes: 0 additions & 35 deletions test/unit/server-statefulset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 306e2f7

Please sign in to comment.