From 45cd0489d22330e236b35e75cfa5aa74a7638b1b Mon Sep 17 00:00:00 2001 From: Rick Lane Date: Thu, 11 Apr 2024 14:59:28 -0400 Subject: [PATCH] Update kubectl auth in matrix test Signed-off-by: Rick Lane --- .github/workflows/matrix.yaml | 65 +++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index 85ef2c02..48d7fc18 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -1,4 +1,4 @@ -name: "Telepresence Test Matrix" +name: "Test Matrix" on: push: branches: @@ -20,53 +20,39 @@ on: default: 'warning' jobs: - telepresence_matrix: + matrix_gke: strategy: matrix: - client_os: [ubuntu] client_arch: [latest] - - client_telepresence_version: ["2.7"] - clusters: - - distribution: GKE - version: "1.27" - - - distribution: Kubeception - version: "1.27" - - - distribution: GKE - version: "1.27" + - version: "1.27" + - version: "1.27" config: '{ "initialNodeCount" : 2 }' - - cluster_telepresence_version: ["none"] - runs-on: ${{ matrix.client_os }}-${{ matrix.client_arch }} env: - KUBECEPTION_TOKEN: ${{ secrets.KUBECEPTION_TOKEN }} GKE_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} steps: - uses: actions/checkout@v4 - - name: Kubectl tool installer - uses: Azure/setup-kubectl@v3 + - uses: 'google-github-actions/auth@v2' with: - # These tests require Kubectl 1.25 or lower since 1.26+ does noe support the GCP auth plugin - version: 'v1.25.3' + credentials_json: ${{ env.GKE_CREDENTIALS }} + - uses: 'google-github-actions/setup-gcloud@v2' + - name: 'Setup gcloud' + env: + USE_GKE_GCLOUD_AUTH_PLUGIN: True + run: | + gcloud components install gke-gcloud-auth-plugin + gcloud components install kubectl - uses: ./provision-cluster with: - distribution: ${{ matrix.clusters.distribution }} + distribution: GKE version: ${{ matrix.clusters.version }} kubeconfig: kubeconfig.yaml - kubeceptionToken: ${{ matrix.clusters.distribution == 'Kubeception' && env.KUBECEPTION_TOKEN }} - gkeCredentials: ${{ matrix.clusters.distribution == 'GKE' && env.GKE_CREDENTIALS }} + gkeCredentials: ${{ env.GKE_CREDENTIALS }} gkeConfig: ${{ matrix.clusters.config }} - - run: | - echo Testing telepresence client version ${{ matrix.client_telepresence_version }} on ${{ matrix.client_os }} ${{ matrix.client_arch }} against server version ${{ matrix.cluster_telepresence_version }} on ${{ matrix.clusters.distribution }} cluster version ${{ matrix.clusters.version }} - kubectl version kubectl get pods -A - - name: "validate gke config" if: ${{ startsWith(matrix.clusters.config, '{') }} run: | @@ -77,3 +63,24 @@ jobs: echo "Gke config was not used" exit 1 fi + matrix_kubeception: + strategy: + matrix: + client_os: [ubuntu] + client_arch: [latest] + clusters: + - version: "1.27" + runs-on: ${{ matrix.client_os }}-${{ matrix.client_arch }} + env: + KUBECEPTION_TOKEN: ${{ secrets.KUBECEPTION_TOKEN }} + steps: + - uses: actions/checkout@v4 + - uses: Azure/setup-kubectl@v3 + - uses: ./provision-cluster + with: + distribution: Kubeception + version: ${{ matrix.clusters.version }} + kubeconfig: kubeconfig.yaml + kubeceptionToken: ${{ env.KUBECEPTION_TOKEN }} + - run: | + kubectl get pods -A