Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
test(chart): test with existing KEDA and KEDA in sub-chart
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 committed Mar 14, 2024
1 parent 0a0f241 commit 8541c53
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,33 @@ jobs:
test-strategy: job
cluster: 'kind'
helm-version: 'v3.10.3'
test-existing-keda: true
- k8s-version: 'v1.26.14'
test-strategy: deployment
cluster: 'kind'
helm-version: 'v3.11.3'
test-existing-keda: true
- k8s-version: 'v1.27.11'
test-strategy: job_https
cluster: 'kind'
helm-version: 'v3.12.3'
test-existing-keda: true
- k8s-version: 'v1.28.7'
test-strategy: job_hostname
cluster: 'minikube'
helm-version: 'v3.13.3'
test-existing-keda: false
- k8s-version: 'v1.29.2'
test-strategy: deployment_https
cluster: 'minikube'
helm-version: 'v3.14.2'
helm-version: 'v3.14.3'
test-existing-keda: false
env:
CLUSTER: ${{ matrix.cluster }}
KUBERNETES_VERSION: ${{ matrix.k8s-version }}
ARTIFACT_NAME: ${{ matrix.k8s-version }}-${{ matrix.test-strategy }}
HELM_VERSION: ${{ matrix.helm-version }}
TEST_EXISTING_KEDA: ${{ matrix.test-existing-keda }}
steps:
- uses: actions/checkout@main
- name: Output Docker info
Expand Down Expand Up @@ -101,7 +107,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 3
command: CLUSTER=${CLUSTER} KUBERNETES_VERSION=${KUBERNETES_VERSION} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_cluster_setup
command: CLUSTER=${CLUSTER} KUBERNETES_VERSION=${KUBERNETES_VERSION} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_EXISTING_KEDA=${TEST_EXISTING_KEDA} make chart_cluster_setup
- name: Test chart template
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_test_template
- name: Test set custom CA certificate
Expand All @@ -119,7 +125,7 @@ jobs:
timeout_minutes: 30
max_attempts: 3
command: |
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_test_autoscaling_${{ matrix.test-strategy }}
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_EXISTING_KEDA=${TEST_EXISTING_KEDA} make chart_test_autoscaling_${{ matrix.test-strategy }}
- name: Cleanup Kubernetes cluster
if: always()
run: CLUSTER=${CLUSTER} make chart_cluster_cleanup
Expand Down
2 changes: 1 addition & 1 deletion tests/charts/make/chart_cluster_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if [ "${CLUSTER}" = "kind" ]; then
done
fi

if [ "${TEST_EXISTING_INGRESS}" = "true" ]; then
if [ "${TEST_EXISTING_KEDA}" = "true" ]; then
echo "Wait for KEDA core to be ready"
kubectl -n ${KEDA_NAMESPACE} wait --for=condition=ready pod -l app.kubernetes.io/instance=${KEDA_NAMESPACE} --timeout 180s
fi
2 changes: 1 addition & 1 deletion tests/charts/make/chart_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if [ "$(uname -m)" = "x86_64" ]; then
echo "==============================="

echo "Installing Helm for AMD64 / x86_64"
HELM_VERSION=${HELM_VERSION:-"v3.14.2"}
HELM_VERSION=${HELM_VERSION:-"v3.14.3"}
curl -fsSL -o helm.tar.gz https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz
mkdir -p helm
tar -xf helm.tar.gz --strip-components 1 -C helm
Expand Down

0 comments on commit 8541c53

Please sign in to comment.