Run CI tests with k8s 1.21 and 1.27 and bump tool versions (#414)

* Run CI tests with k8s v1.21 and v1.27

* Bump versions used in testing
This commit is contained in:
Lari Hotari 2023-12-11 13:00:27 +02:00 committed by GitHub
parent 89da2b2890
commit 8167d22bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 20 deletions

View File

@ -37,17 +37,17 @@ branding:
icon: anchor
inputs:
version:
description: "The chart-testing version to install (default: v3.7.1)"
description: "The chart-testing version to install"
required: false
default: v3.7.1
default: v3.10.1
yamllint_version:
description: "The yamllint version to install (default: 1.27.1)"
description: "The yamllint version to install"
required: false
default: '1.27.1'
default: '1.33.0'
yamale_version:
description: "The yamale version to install (default: 3.0.4)"
description: "The yamale version to install"
required: false
default: '3.0.4'
default: '4.0.4'
runs:
using: composite
steps:

View File

@ -63,7 +63,7 @@ jobs:
if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
steps:
- name: Set up Go 1.12
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: 1.12
id: go
@ -103,7 +103,7 @@ jobs:
if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
uses: azure/setup-helm@v3
with:
version: v3.10.0
version: v3.12.3
- name: Set up Python
if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
@ -141,15 +141,21 @@ jobs:
action: wait
install-chart-tests:
name: ${{ matrix.name }} - Install
name: ${{ matrix.testScenario.name }} - k8s ${{ matrix.k8sVersion.version }} - Install
runs-on: ubuntu-22.04
timeout-minutes: ${{ matrix.timeout || 45 }}
timeout-minutes: ${{ matrix.testScenario.timeout || 45 }}
needs: ['preconditions', 'ct-lint']
if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
strategy:
fail-fast: false
matrix:
include:
# see https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0 for the list of supported k8s versions for kind 0.20.0
k8sVersion:
- version: "1.21.14"
kind_image_tag: v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093
- version: "1.27.3"
kind_image_tag: v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
testScenario:
- name: Basic
values_file: .ci/clusters/values-local-pv.yaml
shortname: basic
@ -180,7 +186,9 @@ jobs:
- name: ZK & BK TLS Only
values_file: .ci/clusters/values-zkbk-tls.yaml
shortname: zkbk-tls
env:
k8sVersion: ${{ matrix.k8sVersion.kind_image_tag }}
KUBECTL_VERSION: ${{ matrix.k8sVersion.version }}
steps:
- name: checkout
uses: actions/checkout@v3
@ -212,7 +220,7 @@ jobs:
# install k9s on the fly
if [ ! -x /usr/local/bin/k9s ]; then
echo "Installing k9s..."
curl -L -s https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_amd64.tar.gz | sudo tar xz -C /usr/local/bin k9s
curl -L -s https://github.com/derailed/k9s/releases/download/v0.29.1/k9s_Linux_amd64.tar.gz | sudo tar xz -C /usr/local/bin k9s
fi
command k9s "$@"
}
@ -233,12 +241,12 @@ jobs:
- name: Run chart-testing (install)
run: |
case "${{ matrix.shortname }}" in
case "${{ matrix.testScenario.shortname }}" in
"jwt-symmetric")
export SYMMETRIC=true
;;
esac
.ci/chart_test.sh ${{ matrix.values_file }}
.ci/chart_test.sh ${{ matrix.testScenario.values_file }}
- name: Collect k8s logs on failure
if: ${{ cancelled() || failure() }}
@ -254,7 +262,7 @@ jobs:
if: ${{ cancelled() || failure() }}
continue-on-error: true
with:
name: k8s-logs-${{ matrix.shortname }}
name: k8s-logs-${{ matrix.testScenario.shortname }}
path: /tmp/k8s-logs
retention-days: 7
if-no-files-found: ignore

View File

@ -25,14 +25,14 @@ fi
OUTPUT=${PULSAR_CHART_HOME}/output
OUTPUT_BIN=${OUTPUT}/bin
KUBECTL_VERSION=1.21.14
: "${KUBECTL_VERSION:=1.21.14}"
KUBECTL_BIN=$OUTPUT_BIN/kubectl
HELM_BIN=$OUTPUT_BIN/helm
HELM_VERSION=3.12.0
KIND_VERSION=0.20.0
: "${HELM_VERSION:=3.12.3}"
: "${KIND_VERSION:=0.20.0}"
KIND_BIN=$OUTPUT_BIN/kind
CR_BIN=$OUTPUT_BIN/cr
CR_VERSION=1.6.0
: "${CR_VERSION:=1.6.0}"
export PATH="$OUTPUT_BIN:$PATH"
test -d "$OUTPUT_BIN" || mkdir -p "$OUTPUT_BIN"