Skip to content

Commit

Permalink
remove OIDC tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam committed Aug 4, 2023
1 parent a0e0864 commit c18905f
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/actions/e2e/create-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,14 @@ runs:
wellKnownPolicies:
ebsCSIController: true
EOF
- name: tag oidc provider of the cluster
if: always()
shell: bash
run: |
for arn in $(aws iam list-open-id-connect-providers --query "OpenIDConnectProviderList[*].{ARN:Arn}" --output text); do
tags=$(aws iam list-open-id-connect-provider-tags --open-id-connect-provider-arn $arn --output json)
if [[ $(echo $tags | jq -r '.Tags[] | select(.Key == "alpha.eksctl.io/cluster-name") | .Value') == "${{ inputs.cluster_name }}" ]]; then
aws iam tag-open-id-connect-provider --open-id-connect-provider-arn $arn \
--tags Key=testing.karpenter.sh/type,Value=e2e Key=github.com/run-url,Value=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
break
fi
done
- name: tag oidc provider of the cluster
if: always()
shell: bash
run: |
oidc_id=$(aws eks describe-cluster --name ${{ inputs.cluster_name }} --query "cluster.identity.oidc.issuer" --output text | cut -d '/' -f 3,4,5)
arn=arn:aws:iam::857221689048:oidc-provider/${oidc_id}
aws iam tag-open-id-connect-provider --open-id-connect-provider-arn $arn \
--tags Key=testing.karpenter.sh/type,Value=e2e Key=github.com/run-url,Value=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: give KarpenterNodeRole permission to bootstrap
shell: bash
run: |
Expand Down

0 comments on commit c18905f

Please sign in to comment.