Skip to content

Commit

Permalink
Add handling for upgrade of serviceaccounts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Oct 10, 2023
1 parent 76bcd79 commit 933e6f8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/actions/e2e/create-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,27 @@ runs:
wellKnownPolicies:
ebsCSIController: true
EOF
# We need to call these create 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 create iamserviceaccount \
--cluster ${{ inputs.cluster_name }} \
--name karpenter \
--namespace karpenter \
--role-name karpenter-irsa-${{ inputs.cluster_name }} \
--attach-policy-arn "arn:aws:iam::${{ inputs.account_id }}:policy/KarpenterControllerPolicy-${{ inputs.cluster_name }}" \
--attach-policy-arn "arn:aws:iam::${{ inputs.account_id }}:policy/KarpenterControllerPolicy-Alpha-${{ inputs.cluster_name }}" \
--role-only \
--approve
eksctl create iamserviceaccount \
--cluster ${{ inputs.cluster_name }} \
--name prometheus-kube-prometheus-prometheus \
--namespace prometheus \
--role-name prometheus-irsa-${{ inputs.cluster_name }} \
--attach-policy-arn "arn:aws:iam::${{ inputs.account_id }}:policy/PrometheusWorkspaceIngestionPolicy" \
--role-only \
--approve
- name: tag oidc provider of the cluster
if: always()
shell: bash
Expand Down

0 comments on commit 933e6f8

Please sign in to comment.