diff --git a/.github/actions/integration-test/action.yaml b/.github/actions/integration-test/action.yaml index 610cf8805..39b10f16c 100644 --- a/.github/actions/integration-test/action.yaml +++ b/.github/actions/integration-test/action.yaml @@ -20,25 +20,20 @@ runs: - uses: actions/setup-go@v5 with: go-version-file: "go.mod" - - 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 ${{ inputs.agents }} - --image docker.io/rancher/k3s:v1.28.2-k3s1 - --servers-memory ${{ inputs.servers-memory }} - --port 80:80@loadbalancer - --port 443:443@loadbalancer - --k3s-arg "--disable=traefik@server:0" + k3s-version: "1.29.7" + agents: ${{ inputs.agents }} + servers-memory: ${{ inputs.servers-memory }} - name: Run integration tests shell: bash run: | if [ "${{ github.event_name }}" == "pull_request" ]; then - k3d image import ${{ inputs.operator-image-name }} -c test-cluster-1 + k3d image import ${{ inputs.operator-image-name }} fi - kubectl config use-context k3d-test-cluster-1 + kubectl config use-context k3d-k3s-default if [ "${{ inputs.evaluation }}" == "true" ]; then TEST_EVALUATION=TRUE EXPORT_RESULT=true IMG=${{ inputs.operator-image-name }} make istio-integration-test else diff --git a/.github/actions/k8s-compatibility-test/action.yaml b/.github/actions/k8s-compatibility-test/action.yaml index db0fe21fd..a6dce5654 100644 --- a/.github/actions/k8s-compatibility-test/action.yaml +++ b/.github/actions/k8s-compatibility-test/action.yaml @@ -10,31 +10,24 @@ runs: - uses: actions/setup-go@v5 with: go-version-file: "go.mod" - - 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" + k3s-version: "1.30.3" - name: Run integration tests run: | if [ "${{ github.event_name }}" == "pull_request" ]; then - k3d image import ${{ inputs.operator-image-name }} -c test-cluster-1 + k3d image import ${{ inputs.operator-image-name }} fi - kubectl config use-context k3d-test-cluster-1 + kubectl config use-context k3d-k3s-default EXPORT_RESULT=true IMG=${{ inputs.operator-image-name }} make istio-integration-test shell: bash - name: Check deprecations run: | set -eou pipefail GO111MODULE=on go install github.com/prometheus/prom2json/cmd/prom2json@v1.3.3 - 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: diff --git a/.github/actions/provision-k3d-cluster/action.yaml b/.github/actions/provision-k3d-cluster/action.yaml new file mode 100644 index 000000000..1a5ddd878 --- /dev/null +++ b/.github/actions/provision-k3d-cluster/action.yaml @@ -0,0 +1,28 @@ +name: 'Provision k3d cluster' +description: 'Provisions a k3d cluster' +inputs: + k3s-version: + description: 'Kubernetes version' + required: true + agents: + description: 'Number of nodes in the cluster' + required: false + default: 1 + servers-memory: + description: 'Number of GB for the node' + required: false + default: 16 + +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 ${{ inputs.agents }} \ + --image docker.io/rancher/k3s:v${{ inputs.k3s-version }}-k3s1 \ + --servers-memory=${{ inputs.servers-memory }}g \ + --port 80:80@loadbalancer \ + --port 443:443@loadbalancer \ + --k3s-arg "--disable=traefik@server:0" \ No newline at end of file diff --git a/.github/actions/upgrade-integration-test/action.yaml b/.github/actions/upgrade-integration-test/action.yaml index b6fcc2170..ac5de6d1b 100644 --- a/.github/actions/upgrade-integration-test/action.yaml +++ b/.github/actions/upgrade-integration-test/action.yaml @@ -13,19 +13,16 @@ runs: - uses: actions/setup-go@v5 with: go-version-file: "go.mod" - - 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 - --k3s-arg "--disable=traefik@server:0" + k3s-version: "1.29.7" - name: Run upgrade integration test run: | if [ "${{ github.event_name }}" == "pull_request" ]; then - k3d image import ${{ inputs.operator-image-name }} -c test-cluster-1 + k3d image import ${{ inputs.operator-image-name }} fi - kubectl config use-context k3d-test-cluster-1 + kubectl config use-context k3d-k3s-default EXPORT_RESULT=true IMG=${{ inputs.operator-image-name }} TARGET_BRANCH=${{inputs.target_branch}} make istio-upgrade-integration-test shell: bash diff --git a/.github/workflows/main-integration.yaml b/.github/workflows/main-integration.yaml index 5b58ac3be..91e9feead 100644 --- a/.github/workflows/main-integration.yaml +++ b/.github/workflows/main-integration.yaml @@ -67,7 +67,7 @@ jobs: - uses: ./.github/actions/integration-test with: operator-image-name: "europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{github.sha}}" - servers-memory: "16g" + servers-memory: "16" agents: 2 istio-integration-gcp: @@ -93,7 +93,7 @@ jobs: GARDENER_PROVIDER_SECRET_NAME: "goat" GARDENER_PROVIDER: "gcp" GARDENER_REGION: "europe-west3" - GARDENER_CLUSTER_VERSION: "1.28" + GARDENER_CLUSTER_VERSION: "1.29.7" MACHINE_TYPE: "n2-standard-4" DISK_SIZE: 50 DISK_TYPE: "pd-standard" @@ -122,7 +122,7 @@ jobs: GARDENER_PROJECT_NAME: "goats" GARDENER_PROVIDER_SECRET_NAME: "aws-gardener-access" GARDENER_PROVIDER: "aws" - GARDENER_CLUSTER_VERSION: "1.28" + GARDENER_CLUSTER_VERSION: "1.29.7" GARDENER_REGION: "eu-west-1" MACHINE_TYPE: "m5.xlarge" DISK_SIZE: 50 @@ -153,7 +153,7 @@ jobs: GARDENER_PROVIDER_SECRET_NAME: "goat" GARDENER_PROVIDER: "gcp" GARDENER_REGION: "europe-west3" - GARDENER_CLUSTER_VERSION: "1.28" + GARDENER_CLUSTER_VERSION: "1.29.7" MACHINE_TYPE: "n2-standard-4" DISK_SIZE: 50 DISK_TYPE: "pd-standard" @@ -182,7 +182,7 @@ jobs: GARDENER_PROJECT_NAME: "goats" GARDENER_PROVIDER_SECRET_NAME: "aws-gardener-access" GARDENER_PROVIDER: "aws" - GARDENER_CLUSTER_VERSION: "1.28" + GARDENER_CLUSTER_VERSION: "1.29.7" GARDENER_REGION: "eu-west-1" MACHINE_TYPE: "m5.xlarge" DISK_SIZE: 50 diff --git a/.github/workflows/pull-integration-gardener.yaml b/.github/workflows/pull-integration-gardener.yaml index 39736a160..c9a65783b 100644 --- a/.github/workflows/pull-integration-gardener.yaml +++ b/.github/workflows/pull-integration-gardener.yaml @@ -74,7 +74,7 @@ jobs: GARDENER_PROVIDER_SECRET_NAME: "goat" GARDENER_PROVIDER: "gcp" GARDENER_REGION: "europe-west3" - GARDENER_CLUSTER_VERSION: "1.28" + GARDENER_CLUSTER_VERSION: "1.29.7" MACHINE_TYPE: "n2-standard-4" DISK_SIZE: 50 DISK_TYPE: "pd-standard" @@ -104,7 +104,7 @@ jobs: GARDENER_PROJECT_NAME: "goats" GARDENER_PROVIDER_SECRET_NAME: "aws-gardener-access" GARDENER_PROVIDER: "aws" - GARDENER_CLUSTER_VERSION: "1.28" + GARDENER_CLUSTER_VERSION: "1.29.7" GARDENER_REGION: "eu-west-1" MACHINE_TYPE: "m5.xlarge" DISK_SIZE: 50 @@ -136,7 +136,7 @@ jobs: GARDENER_PROVIDER_SECRET_NAME: "goat" GARDENER_PROVIDER: "gcp" GARDENER_REGION: "europe-west3" - GARDENER_CLUSTER_VERSION: "1.28" + GARDENER_CLUSTER_VERSION: "1.29.7" MACHINE_TYPE: "n2-standard-4" DISK_SIZE: 50 DISK_TYPE: "pd-standard" diff --git a/.github/workflows/pull-integration.yaml b/.github/workflows/pull-integration.yaml index 051be67a0..8830986eb 100644 --- a/.github/workflows/pull-integration.yaml +++ b/.github/workflows/pull-integration.yaml @@ -42,7 +42,7 @@ jobs: with: evaluation: false operator-image-name: "istio-manager:PR-${{github.event.number}}" - servers-memory: "16g" + servers-memory: "16" agents: 2 istio-integration-test-evaluation: @@ -57,5 +57,5 @@ jobs: with: evaluation: true operator-image-name: "istio-manager:PR-${{github.event.number}}" - servers-memory: "4g" + servers-memory: "4" agents: 0 diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 1ccd08fe5..294fd8ba0 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -20,11 +20,9 @@ jobs: files_ignore: | docs/** **/*.md - **/*.yaml tests/performance/** OWNERS CODEOWNERS - .github/** .reuse/** - name: List all changed files run: echo '${{ steps.changed-files.outputs.all_changed_files }}' >> $GITHUB_STEP_SUMMARY @@ -58,7 +56,6 @@ jobs: OWNERS CODEOWNERS sec-scanners-config.yaml - .github/** .reuse/** - name: List all changed files run: echo '${{ steps.changed-files.outputs.all_changed_files }}' >> $GITHUB_STEP_SUMMARY @@ -87,7 +84,6 @@ jobs: OWNERS CODEOWNERS sec-scanners-config.yaml - .github/** .reuse/** - name: List all changed files run: echo '${{ steps.changed-files.outputs.all_changed_files }}' >> $GITHUB_STEP_SUMMARY diff --git a/pkg/lib/sidecars/test/restart_test.go b/pkg/lib/sidecars/test/restart_test.go index 84a06a719..eedc03396 100644 --- a/pkg/lib/sidecars/test/restart_test.go +++ b/pkg/lib/sidecars/test/restart_test.go @@ -80,7 +80,7 @@ func generateReport() { } err := htmlReport.Generate() if err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } err = filepath.Walk("reports", func(path string, info fs.FileInfo, err error) error { @@ -108,7 +108,7 @@ func generateReport() { }) if err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } if artifactsDir, ok := os.LookupEnv("ARTIFACTS"); ok { @@ -125,12 +125,12 @@ func generateReport() { }) if err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } _, err = copyReport("./junit-report.xml", fmt.Sprintf("%s/junit-report.xml", artifactsDir)) if err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } }