generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
- Loading branch information
Jacob Woffenden
committed
May 30, 2024
1 parent
b428321
commit e949371
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
terraform/environments/analytical-platform-compute/helm-charts-actions-runners.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
data "aws_secretsmanager_secret_version" "actions_runners_create_a_derived_table" { | ||
count = terraform.workspace == "analytical-platform-compute-production" ? 1 : 0 | ||
|
||
secret_id = module.actions_runners_create_a_derived_table_secret[0].secret_id | ||
} | ||
|
||
resource "helm_release" "actions_runner_mojas_create_a_derived_table" { | ||
count = terraform.workspace == "analytical-platform-compute-production" ? 1 : 0 | ||
|
||
/* https://github.com/ministryofjustice/analytical-platform-actions-runner */ | ||
name = "actions-runner-mojas-create-a-derived-table" | ||
repository = "oci://ghcr.io/ministryofjustice/analytical-platform-charts" | ||
version = "2.316.1" | ||
chart = "actions-runner" | ||
namespace = kubernetes_namespace.actions_runners[0].metadata[0].name | ||
values = [ | ||
templatefile( | ||
"${path.module}/src/helm/values/actions-runners/create-a-derived-table/values.yml.tftpl", | ||
{ | ||
replicaCount = 2 | ||
github_organisation = "moj-analytical-services" | ||
github_repository = "create-a-derived-table" | ||
github_token = data.aws_secretsmanager_secret_version.actions_runners_create_a_derived_table[0].secret_string | ||
github_runner_labels = "analytical-platform" | ||
eks_role_arn = "arn:aws:iam::593291632749:role/create-a-derived-table" | ||
} | ||
) | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...-platform-compute/src/helm/values/actions-runners/create-a-derived-table/values.yml.tftpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
replicaCount: ${replicaCount} | ||
|
||
github: | ||
organisation: ${github_organisation} | ||
repository: ${github_repository} | ||
token: ${github_token} | ||
runner: | ||
labels: ${github_runner_labels} | ||
|
||
serviceAccount: | ||
annotations: | ||
eks.amazonaws.com/role-arn: ${eks_role_arn} |