Skip to content
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

fix: remove k8s 1.16 from acceptance testing #848

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/acceptance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kind-k8s-version: [1.16.15, 1.20.15, 1.21.14, 1.22.15, 1.23.12, 1.24.6, 1.25.3]
kind-k8s-version: [1.20.15, 1.21.14, 1.22.15, 1.23.12, 1.24.6, 1.25.3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v2
name: vault
version: 0.23.0
appVersion: 1.12.1
kubeVersion: ">= 1.16.0-0"
kubeVersion: ">= 1.20.0-0"
description: Official HashiCorp Vault Chart
home: https://www.vaultproject.io
icon: https://github.com/hashicorp/vault/raw/f22d202cde2018f9455dec755118a9b84586e082/Vault_PrimaryLogo_Black.png
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ this README. Please refer to the Kubernetes and Helm documentation.
The versions required are:

* **Helm 3.6+**
* **Kubernetes 1.16+** - This is the earliest version of Kubernetes tested.
* **Kubernetes 1.20+** - This is the earliest version of Kubernetes tested.
It is possible that this chart works with earlier versions but it is
untested.

Expand Down
7 changes: 0 additions & 7 deletions templates/server-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,12 @@ spec:
{{- end }}
{{- range (.paths | default (list "/")) }}
- path: {{ . }}
{{ if semverCompare ">= 1.19.0-0" $kubeVersion }}
pathType: {{ $pathType }}
{{ end }}
backend:
{{ if semverCompare ">= 1.19.0-0" $kubeVersion }}
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{ else }}
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{ end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/injector-disruptionbudget.bats
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ load _helpers
local actual=$(helm template \
--show-only templates/injector-disruptionbudget.yaml \
--set 'injector.podDisruptionBudget.minAvailable=2' \
--kube-version 1.19.5 \
--kube-version 1.20.15 \
. | tee /dev/stderr |
yq '.apiVersion == "policy/v1beta1"' | tee /dev/stderr)
[ "${actual}" = "true" ]
Expand Down
2 changes: 1 addition & 1 deletion test/unit/server-ha-disruptionbudget.bats
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ load _helpers
--show-only templates/server-disruptionbudget.yaml \
--set 'server.ha.enabled=true' \
--set 'server.ha.replicas=1' \
--kube-version 1.19.5 \
--kube-version 1.20.15 \
. | tee /dev/stderr |
yq '.apiVersion == "policy/v1beta1"' | tee /dev/stderr)
[ "${actual}" = "true" ]
Expand Down
23 changes: 5 additions & 18 deletions test/unit/server-ingress.bats
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ load _helpers
[ "${actual}" = "release-name-vault" ]
}

@test "server/ingress: k8s 1.18.3 uses regular service when not ha - yaml" {
@test "server/ingress: k8s 1.20.15 uses correct service format when not ha - yaml" {
cd `chart_dir`

local actual=$(helm template \
Expand All @@ -206,9 +206,9 @@ load _helpers
--set 'server.dev.enabled=false' \
--set 'server.ha.enabled=false' \
--set 'server.service.enabled=true' \
--kube-version 1.18.3 \
--kube-version 1.20.15 \
. | tee /dev/stderr |
yq -r '.spec.rules[0].http.paths[0].backend.serviceName' | tee /dev/stderr)
yq -r '.spec.rules[0].http.paths[0].backend.service.name' | tee /dev/stderr)
[ "${actual}" = "release-name-vault" ]
}

Expand All @@ -227,32 +227,19 @@ load _helpers
[ "${actual}" = "release-name-vault" ]
}

@test "server/ingress: pathType is added to Kubernetes version == 1.19.0" {
@test "server/ingress: pathType is added to Kubernetes version == 1.20.15" {
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.19.0 \
--kube-version 1.20.15 \
. | tee /dev/stderr |
yq -r '.spec.rules[0].http.paths[0].pathType' | tee /dev/stderr)
[ "${actual}" = "ImplementationSpecific" ]
}

@test "server/ingress: pathType is not 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=ImplementationSpecific \
--kube-version 1.18.3 \
. | tee /dev/stderr |
yq -r '.spec.rules[0].http.paths[0].pathType' | tee /dev/stderr)
[ "${actual}" = "null" ]
}

@test "server/ingress: pathType is added to Kubernetes versions > 1.19" {
cd `chart_dir`

Expand Down