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 efe6ef9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 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,29 @@ 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 \
--override-existing-serviceaccounts \
--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 \
--override-existing-serviceaccounts \
--approve
- name: tag oidc provider of the cluster
if: always()
shell: bash
Expand Down

0 comments on commit efe6ef9

Please sign in to comment.