From c5f9d1f531071aad57e50fbe337b9e33a3b02284 Mon Sep 17 00:00:00 2001 From: Rick Lane Date: Thu, 11 Apr 2024 14:52:43 -0400 Subject: [PATCH] Update kubectl auth in matrix test --- .github/workflows/matrix.yaml | 62 +++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index 85ef2c02..9d5e74c1 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -20,53 +20,43 @@ on: default: 'warning' jobs: - telepresence_matrix: + telepresence_matrix_gke: strategy: matrix: - client_os: [ubuntu] client_arch: [latest] - client_telepresence_version: ["2.7"] - + cluster_telepresence_version: ["none"] 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 + - uses: Azure/setup-kubectl@v3 - 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 }} 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 +67,27 @@ jobs: echo "Gke config was not used" exit 1 fi + telepresence_matrix_kubeception: + strategy: + matrix: + client_os: [ubuntu] + client_arch: [latest] + client_telepresence_version: ["2.7"] + cluster_telepresence_version: ["none"] + clusters: + - version: "1.27" + runs-on: ${{ matrix.client_os }}-${{ matrix.client_arch }} + env: + KUBECEPTION_TOKEN: ${{ secrets.KUBECEPTION_TOKEN }} + steps: + - uses: Azure/setup-kubectl@v3 + - uses: ./provision-cluster + with: + distribution: Kubeception + version: ${{ matrix.clusters.version }} + kubeconfig: kubeconfig.yaml + kubeceptionToken: ${{ matrix.clusters.distribution == 'Kubeception' && env.KUBECEPTION_TOKEN }} + - 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