Skip to content

Commit

Permalink
[#77] Add GCS artifact storage to GKE Argo installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Karbyshev committed Apr 5, 2021
1 parent 5c8100c commit 8e274a4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions terraform/modules/k8s/argo/main/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ locals {
}
}

# artifact_repository = {
# artifactRepository = {
# archiveLogs = true
# gcs = {
# bucket = var.configuration.artifact_bucket
# keyFormat = "argo/{{workflow.namespace}}/{{workflow.name}}/"
# }
# }
# }
artifact_repository = {
artifactRepository = {
archiveLogs = true
gcs = {
bucket = var.configuration.artifact_bucket
keyFormat = "argo/{{workflow.namespace}}/{{workflow.name}}/"
}
}
}

controller = {
controller = {
Expand Down Expand Up @@ -176,7 +176,7 @@ resource "helm_release" "argo_workflows" {
controller = yamlencode(local.controller)
pgsql_enabled = var.pgsql.enabled
workflow = yamlencode(local.workflow)
# artifact_repository = yamlencode(local.artifact_repository)
artifact_repository = yamlencode(local.artifact_repository)
# workflows_namespace = local.workflows_namespace
# node_selector = var.configuration.node_pool[keys(var.configuration.node_pool)[0]].labels.mode
# node_taint = var.configuration.node_pool[keys(var.configuration.node_pool)[0]].taints[0].value
Expand Down
14 changes: 7 additions & 7 deletions terraform/modules/k8s/argo/prereqs/gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ resource "google_storage_bucket_iam_member" "argo_store_legacy_write" {
depends_on = [google_service_account.argo]
}

#resource "google_storage_bucket_iam_member" "odahu_store" {
# bucket = var.bucket
# member = "serviceAccount:${google_service_account.airflow.email}"
# role = "roles/storage.objectAdmin"
# depends_on = [google_service_account.airflow]
#}
resource "google_storage_bucket_iam_member" "odahu_store" {
bucket = var.bucket
member = "serviceAccount:${google_service_account.argo.email}"
role = "roles/storage.objectAdmin"
depends_on = [google_service_account.argo]
}

resource "google_kms_crypto_key_iam_member" "argo_kms_decrypt" {
count = var.kms_key_id == "" ? 0 : 1
Expand All @@ -45,7 +45,7 @@ resource "google_service_account_iam_binding" "argo_web_identity" {
service_account_id = google_service_account.argo.name
role = "roles/iam.workloadIdentityUser"

members = ["serviceAccount:${var.project_id}.svc.id.goog[argo-workflow]"]
members = ["serviceAccount:${var.project_id}.svc.id.goog[argo]"]
}

resource "google_service_account_key" "argo_sa_key" {
Expand Down

0 comments on commit 8e274a4

Please sign in to comment.