From 42ff5dc62635e10286089f1a31cce234da2f5a4a Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Wed, 11 Oct 2023 10:02:56 -0700 Subject: [PATCH] test: Provide IAM permission to `cloudformation:DescribeStackResources` (#4786) --- .github/actions/e2e/create-cluster/action.yaml | 10 +++++++++- .github/workflows/e2e-matrix.yaml | 7 ++++--- test/cloudformation/iam_cloudformation.yaml | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/actions/e2e/create-cluster/action.yaml b/.github/actions/e2e/create-cluster/action.yaml index 6c8bc30d3255..8ad1c7428cc7 100644 --- a/.github/actions/e2e/create-cluster/action.yaml +++ b/.github/actions/e2e/create-cluster/action.yaml @@ -85,7 +85,7 @@ runs: cmd="create" eksctl get cluster --name ${{ inputs.cluster_name }} && cmd="upgrade" - eksctl ${cmd} cluster -f - <> clusterconfig.yaml --- apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig @@ -146,6 +146,14 @@ runs: wellKnownPolicies: ebsCSIController: true EOF + + eksctl ${cmd} cluster -f clusterconfig.yaml + + # We need to call these update iamserviceaccount commands again since the "eksctl upgrade cluster" action + # doesn't handle updates to IAM serviceaccounts correctly when the roles assigned to them change + eksctl update iamserviceaccount -f clusterconfig.yaml --approve + + - name: tag oidc provider of the cluster if: always() shell: bash diff --git a/.github/workflows/e2e-matrix.yaml b/.github/workflows/e2e-matrix.yaml index 339a3a142f87..6ed99e570507 100644 --- a/.github/workflows/e2e-matrix.yaml +++ b/.github/workflows/e2e-matrix.yaml @@ -63,9 +63,10 @@ jobs: e2e-upgrade: uses: ./.github/workflows/e2e-upgrade.yaml with: - # This version matches the steps of the newest version of the install-eksctl action - # which will take in the eksctl_version into the composite action - from_git_ref: 3519331035579ac0caf66a7f5a5282a2fef9b409 + # This version matches the steps of the newest version that contains the additional step + # of deploying the instance profile so that the pre-upgrade and post-upgrade create-cluster + # actions have the same number of steps and don't fail during post-cleanup + from_git_ref: 62c25a3ea85c7d00165e60a913fff1ec7c1f29fd to_git_ref: ${{ inputs.git_ref }} region: ${{ inputs.region }} k8s_version: ${{ inputs.k8s_version }} diff --git a/test/cloudformation/iam_cloudformation.yaml b/test/cloudformation/iam_cloudformation.yaml index 90f2192c4a4b..cb8a8c7a4c03 100644 --- a/test/cloudformation/iam_cloudformation.yaml +++ b/test/cloudformation/iam_cloudformation.yaml @@ -123,6 +123,7 @@ Resources: - cloudformation:DeleteStack - cloudformation:DescribeChangeSet - cloudformation:DescribeStackEvents + - cloudformation:DescribeStackResources - cloudformation:ExecuteChangeSet - cloudformation:GetTemplate - cloudformation:GetTemplateSummary