Skip to content

Commit

Permalink
cicd: bump k8s versions for int tests (kyma-project#1242)
Browse files Browse the repository at this point in the history
* bump k8s versions for int tests

* bump k8s versions for int tests

* Manual provisioning of k3d clusters

* Manual provisioning of k3d clusters

* Manual provisioning of k3d clusters

* Move k3d provisioning to separate action

* Missing dollar sign
  • Loading branch information
kolodziejczak authored Aug 12, 2024
1 parent 7f0a5d3 commit b7e88b6
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 36 deletions.
15 changes: 5 additions & 10 deletions .github/actions/integration-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,10 @@ runs:
run: |
git fetch origin pull/${{ github.event.number }}/head:PR-${{ github.event.number }}
git checkout PR-${{ github.event.number }}
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
- name: Create Cluster
uses: ./.github/actions/provision-k3d-cluster
with:
cluster-name: "test-cluster-1"
args: >-
--agents 0
--port 80:80@loadbalancer
--port 443:443@loadbalancer
--k3s-arg "--disable=traefik@server:0"
version: "1.29.7"
- name: Run integration tests
shell: bash
env:
Expand All @@ -47,9 +42,9 @@ runs:
IMG: ${{ inputs.manager_image }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
k3d image import ${{ inputs.manager_image }} -c test-cluster-1
k3d image import ${{ inputs.manager_image }} -c k3s-default
fi
kubectl config use-context k3d-test-cluster-1
kubectl config use-context k3d-k3s-default
EXPORT_RESULT=true make install-istio deploy ${{ inputs.test_make_target }}
- shell: bash
name: gather deployment logs
Expand Down
21 changes: 7 additions & 14 deletions .github/actions/k8s-compatibility-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,11 @@ runs:
run: |
git fetch origin pull/${{ github.event.number }}/head:PR-${{ github.event.number }}
git checkout PR-${{ github.event.number }}
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
- name: Create Cluster
uses: ./.github/actions/provision-k3d-cluster
with:
cluster-name: "test-cluster-1"
args: >-
--agents 2
--image docker.io/rancher/k3s:v1.29.4-k3s1
--servers-memory=16g
--port 80:80@loadbalancer
--port 443:443@loadbalancer
--k3s-arg "--disable=traefik@server:0"
- name: Provision Kyma and run tests
version: "1.30.3"
- name: Deploy APIGateway manager and run tests
shell: bash
env:
KYMA_DOMAIN: "local.kyma.dev"
Expand All @@ -49,15 +42,15 @@ runs:
IMG: ${{ inputs.manager_image }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
k3d image import ${{ inputs.manager_image }} -c test-cluster-1
k3d image import ${{ inputs.manager_image }} -c k3s-default
fi
kubectl config use-context k3d-test-cluster-1
kubectl config use-context k3d-k3s-default
EXPORT_RESULT=true make install-istio deploy ${{ inputs.test_make_target }}
- name: Check deprecations
run: |
set -eou pipefail
GO111MODULE=on go install github.com/prometheus/prom2json/cmd/[email protected]
kubectl get --context k3d-test-cluster-1 --raw /metrics | prom2json | jq '.[] | select(.name=="apiserver_requested_deprecated_apis").metrics[].labels' > deprecations.txt
kubectl get --context k3d-k3s-default --raw /metrics | prom2json | jq '.[] | select(.name=="apiserver_requested_deprecated_apis").metrics[].labels' > deprecations.txt
shell: bash
- uses: actions/upload-artifact@v4
with:
Expand Down
20 changes: 20 additions & 0 deletions .github/actions/provision-k3d-cluster/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Provision k3d cluster'
description: 'Provisions a k3d cluster'
inputs:
version:
description: 'Kubernetes version'
required: true

runs:
using: "composite"
steps:
- name: Provision k3d cluster
shell: bash
run: |
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
k3d cluster create --agents 2 \
--image docker.io/rancher/k3s:v${{ inputs.version }}-k3s1 \
--servers-memory=16g \
--port 80:80@loadbalancer \
--port 443:443@loadbalancer \
--k3s-arg "--disable=traefik@server:0"
18 changes: 8 additions & 10 deletions .github/actions/upgrade-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ runs:
run: |
git fetch origin pull/${{ github.event.number }}/head:PR-${{ github.event.number }}
git checkout PR-${{ github.event.number }}
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
- name: Create Cluster
shell: bash
run: |
- name: Create Cluster
uses: ./.github/actions/provision-k3d-cluster
with:
cluster-name: "test-cluster-1"
args: >-
--agents 0
--port 80:80@loadbalancer
--port 443:443@loadbalancer
--k3s-arg "--disable=traefik@server:0"
version: "1.29.7"
- name: Run test
shell: bash
env:
Expand All @@ -48,9 +46,9 @@ runs:
OIDC_CONFIG_URL: ${{ inputs.oidc_well_known_url }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
k3d image import ${{ inputs.manager_image }} -c test-cluster-1
k3d image import ${{ inputs.manager_image }} -c k3s-default
fi
kubectl config use-context k3d-test-cluster-1
kubectl config use-context k3d-k3s-default
EXPORT_RESULT=true TARGET_BRANCH=${{inputs.target_branch}} make test-upgrade
- name: Uploads artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion hack/ci/custom-domain-gardener-aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export GARDENER_PROVIDER="aws"
export GARDENER_REGION="eu-west-1"
export GARDENER_PROVIDER_SECRET_NAME="aws-gardener-access"
export GARDENER_PROJECT_NAME="goats"
export GARDENER_CLUSTER_VERSION="1.27.8"
export GARDENER_CLUSTER_VERSION="1.29.7"

./hack/ci/custom-domain-gardener.sh
2 changes: 1 addition & 1 deletion hack/ci/custom-domain-gardener-gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export GARDENER_PROVIDER="gcp"
export GARDENER_REGION="europe-west3"
export GARDENER_PROVIDER_SECRET_NAME="goat"
export GARDENER_PROJECT_NAME="goats"
export GARDENER_CLUSTER_VERSION="1.27.8"
export GARDENER_CLUSTER_VERSION="1.29.7"

./hack/ci/custom-domain-gardener.sh

0 comments on commit b7e88b6

Please sign in to comment.