Skip to content

chore: update actions and kubernetes versions in CI workflows #294

chore: update actions and kubernetes versions in CI workflows

chore: update actions and kubernetes versions in CI workflows #294

Workflow file for this run

name: Helm Chart CI (HTTP add-on)
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
paths:
- ".github/workflows/ci-http-add-on.yml"
- "http-add-on/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/ci-http-add-on.yml"
- "http-add-on/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint-helm-3-x:
name: Lint Helm Chart
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Helm install
uses: Azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
- name: Lint 'http-add-on' Helm chart
run: helm lint http-add-on
deploy-helm-3-x:
name: Deploy to Kubernetes ${{ matrix.kubernetesVersion }}
needs: lint-helm-3-x
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kubernetesVersion: [v1.32, v1.31, v1.30, v1.29]
include:
- kubernetesVersion: v1.32
kindImage: kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027
- kubernetesVersion: v1.31
kindImage: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30
- kubernetesVersion: v1.30
kindImage: kindest/node:v1.30.8@sha256:17cd608b3971338d9180b00776cb766c50d0a0b6b904ab4ff52fd3fc5c6369bf
- kubernetesVersion: v1.29
kindImage: kindest/node:v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Helm install
uses: Azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
- name: Create k8s ${{ matrix.kubernetesVersion }} Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ matrix.kindImage }}
- name: Show Kubernetes version
run: |
kubectl version
- name: Show Kubernetes nodes
run: |
kubectl get nodes -o wide
- name: Show Helm version
run: |
helm version
- name: Create KEDA namespace
run: kubectl create ns keda
- name: Generate values
run: |
cat <<EOF > keda-values.yaml
image:
keda:
tag: main
metricsApiServer:
tag: main
webhooks:
tag: main
- name: Install KEDA chart
run: helm install keda ./keda/ --namespace keda --values keda-values.yaml
- name: Generate values
run: |
cat <<EOF > test-values.yaml
additionalLabels:
random: value
images:
tag: canary
rbac:
aggregateToDefaultRoles: true
interceptor:
replicas:
min: 1
EOF
- name: Template Helm chart
run: helm template http-add-on ./http-add-on/ --namespace keda --values test-values.yaml
- name: Install Helm chart
run: helm install http-add-on ./http-add-on/ --namespace keda --values test-values.yaml --wait
- name: Show Kubernetes resources
run: kubectl get all --namespace keda
if: always()
- name: Get all HTTPScaledObjects
run: kubectl get httpscaledobjects
- name: Get all CRDs
run: kubectl get crds
- name: Get HTTPScaledObject CRD
run: kubectl get crds/httpscaledobjects.http.keda.sh
- name: Describe HTTPScaledObject CRD
run: kubectl describe crds/httpscaledobjects.http.keda.sh
- name: Validate Interceptor ScaledObject
run: |
for N in {1..3}
do
READY=$(kubectl get so/keda-add-ons-http-interceptor -n keda -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}')
echo "ScaledObjet is ready: $READY"
if [[ "$READY" == "True" ]]; then
exit 0
fi
sleep 15s
done
exit 1