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 icon: anchor
inputs: inputs:
version: version:
description: "The chart-testing version to install (default: v3.7.1)" description: "The chart-testing version to install"
required: false required: false
default: v3.7.1 default: v3.10.1
yamllint_version: yamllint_version:
description: "The yamllint version to install (default: 1.27.1)" description: "The yamllint version to install"
required: false required: false
default: '1.27.1' default: '1.33.0'
yamale_version: yamale_version:
description: "The yamale version to install (default: 3.0.4)" description: "The yamale version to install"
required: false required: false
default: '3.0.4' default: '4.0.4'
runs: runs:
using: composite using: composite
steps: steps:

View File

@ -63,7 +63,7 @@ jobs:
if: ${{ needs.preconditions.outputs.docs_only != 'true' }} if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
steps: steps:
- name: Set up Go 1.12 - name: Set up Go 1.12
uses: actions/setup-go@v1 uses: actions/setup-go@v4
with: with:
go-version: 1.12 go-version: 1.12
id: go id: go
@ -103,7 +103,7 @@ jobs:
if: ${{ steps.check_changes.outputs.docs_only != 'true' }} if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
uses: azure/setup-helm@v3 uses: azure/setup-helm@v3
with: with:
version: v3.10.0 version: v3.12.3
- name: Set up Python - name: Set up Python
if: ${{ steps.check_changes.outputs.docs_only != 'true' }} if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
@ -141,15 +141,21 @@ jobs:
action: wait action: wait
install-chart-tests: install-chart-tests:
name: ${{ matrix.name }} - Install name: ${{ matrix.testScenario.name }} - k8s ${{ matrix.k8sVersion.version }} - Install
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
timeout-minutes: ${{ matrix.timeout || 45 }} timeout-minutes: ${{ matrix.testScenario.timeout || 45 }}
needs: ['preconditions', 'ct-lint'] needs: ['preconditions', 'ct-lint']
if: ${{ needs.preconditions.outputs.docs_only != 'true' }} if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: 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 - name: Basic
values_file: .ci/clusters/values-local-pv.yaml values_file: .ci/clusters/values-local-pv.yaml
shortname: basic shortname: basic
@ -180,7 +186,9 @@ jobs:
- name: ZK & BK TLS Only - name: ZK & BK TLS Only
values_file: .ci/clusters/values-zkbk-tls.yaml values_file: .ci/clusters/values-zkbk-tls.yaml
shortname: zkbk-tls shortname: zkbk-tls
env:
k8sVersion: ${{ matrix.k8sVersion.kind_image_tag }}
KUBECTL_VERSION: ${{ matrix.k8sVersion.version }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -212,7 +220,7 @@ jobs:
# install k9s on the fly # install k9s on the fly
if [ ! -x /usr/local/bin/k9s ]; then if [ ! -x /usr/local/bin/k9s ]; then
echo "Installing k9s..." 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 fi
command k9s "$@" command k9s "$@"
} }
@ -233,12 +241,12 @@ jobs:
- name: Run chart-testing (install) - name: Run chart-testing (install)
run: | run: |
case "${{ matrix.shortname }}" in case "${{ matrix.testScenario.shortname }}" in
"jwt-symmetric") "jwt-symmetric")
export SYMMETRIC=true export SYMMETRIC=true
;; ;;
esac esac
.ci/chart_test.sh ${{ matrix.values_file }} .ci/chart_test.sh ${{ matrix.testScenario.values_file }}
- name: Collect k8s logs on failure - name: Collect k8s logs on failure
if: ${{ cancelled() || failure() }} if: ${{ cancelled() || failure() }}
@ -254,7 +262,7 @@ jobs:
if: ${{ cancelled() || failure() }} if: ${{ cancelled() || failure() }}
continue-on-error: true continue-on-error: true
with: with:
name: k8s-logs-${{ matrix.shortname }} name: k8s-logs-${{ matrix.testScenario.shortname }}
path: /tmp/k8s-logs path: /tmp/k8s-logs
retention-days: 7 retention-days: 7
if-no-files-found: ignore if-no-files-found: ignore

View File

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