From 7c301c3e77bfa36487ed90b40c7ee57640ced2ad Mon Sep 17 00:00:00 2001 From: Michi Mutsuzaki Date: Tue, 16 May 2023 22:32:48 +0000 Subject: [PATCH] helm mode: Add external workloads test coverage Ref: #1625 Signed-off-by: Michi Mutsuzaki --- .../external-workloads-install.sh | 4 +++- .github/workflows/externalworkloads.yaml | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/in-cluster-test-scripts/external-workloads-install.sh b/.github/in-cluster-test-scripts/external-workloads-install.sh index 40128a4a96..9f26713d09 100644 --- a/.github/in-cluster-test-scripts/external-workloads-install.sh +++ b/.github/in-cluster-test-scripts/external-workloads-install.sh @@ -23,7 +23,9 @@ cilium hubble enable cilium status --wait # Enable cluster mesh -cilium clustermesh enable +# Explicitly specify LoadBalancer service type since the default type is NodePort in helm mode. +# Ref: https://github.com/cilium/cilium-cli/pull/1527#discussion_r1177244379 +cilium clustermesh enable --service-type LoadBalancer # Wait for cluster mesh status to be ready cilium clustermesh status --wait diff --git a/.github/workflows/externalworkloads.yaml b/.github/workflows/externalworkloads.yaml index 1335f05afd..62a1a6b403 100644 --- a/.github/workflows/externalworkloads.yaml +++ b/.github/workflows/externalworkloads.yaml @@ -26,8 +26,6 @@ concurrency: cancel-in-progress: true env: - clusterName: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}-vm - vmName: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}-vm zone: us-west2-a vmStartupScript: .github/gcp-vm-startup.sh cilium_version: v1.13.2 @@ -39,7 +37,15 @@ jobs: if: ${{ github.repository == 'cilium/cilium-cli' }} runs-on: ubuntu-22.04 timeout-minutes: 45 + strategy: + matrix: + mode: ["classic", "helm"] steps: + - name: Set cluster name + run: | + echo "clusterName=${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}-${{ matrix.mode }}-vm" >> $GITHUB_ENV + echo "vmName=${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}-${{ matrix.mode }}-vm" >> $GITHUB_ENV + - name: Checkout uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 @@ -147,7 +153,8 @@ jobs: --set job_name=cilium-cli-install \ --set test_script_cm=cilium-cli-test-script-install \ --set vm_name=${{ env.vmName }} \ - --set cluster_cidr=${{ steps.cluster.outputs.cluster_cidr }} + --set cluster_cidr=${{ steps.cluster.outputs.cluster_cidr }} \ + --set cilium_cli_mode=${{ matrix.mode }} - name: Wait for install job env: @@ -204,7 +211,8 @@ jobs: --generate-name \ --set tag=${{ steps.vars.outputs.sha }} \ --set job_name=cilium-cli \ - --set test_script_cm=cilium-cli-test-script + --set test_script_cm=cilium-cli-test-script \ + --set cilium_cli_mode=${{ matrix.mode }} - name: Wait for test job env: