Skip to content

Commit

Permalink
Added patch k9s service account of github runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Khramtsov committed Aug 21, 2024
1 parent f6cf143 commit 9e20f6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terraform/modules/k8s-addons/eks-gha-runner-scale-set.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ resource "helm_release" "gha_runner_scale_set" {
depends_on = [module.gha_runner_scale_set_controller_namespace]
}

resource "null_resource" "k8s_svc_patch" {
resource "null_resource" "k8s_service_account_patch" {
count = local.gha_runner_scale_set.enabled ? 1 : 0
provisioner "local-exec" {
command = <<EOH
kubectl patch serviceaccount gha-runner-scale-set-gha-rs-no-permission -n ${module.gha_runner_scale_set_controller_namespace[0].name} \
kubectl patch serviceaccount ${local.service_account_name} -n ${module.gha_runner_scale_set_controller_namespace[0].name} \
-p '{"metadata": {"annotations": {"eks.amazonaws.com/role-arn": "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/gha-runner-scale-set-role"}}}'
EOH
}
Expand Down

0 comments on commit 9e20f6a

Please sign in to comment.