From 9c32ca2752c70cf1cae8b1fe72c0e76b49c9043d Mon Sep 17 00:00:00 2001 From: Jessica Gadling Date: Wed, 10 Jan 2024 17:35:54 -0500 Subject: [PATCH 01/13] Let's try to mount a scratch dir to a pod. --- terraform/modules/happy-service-eks/main.tf | 25 ++++++++++++++++--- .../modules/happy-service-eks/variables.tf | 11 ++++++++ terraform/modules/happy-stack-eks/main.tf | 3 +++ .../modules/happy-stack-eks/variables.tf | 11 ++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/terraform/modules/happy-service-eks/main.tf b/terraform/modules/happy-service-eks/main.tf index 0c990997a4..484d591034 100644 --- a/terraform/modules/happy-service-eks/main.tf +++ b/terraform/modules/happy-service-eks/main.tf @@ -291,6 +291,15 @@ resource "kubernetes_deployment_v1" "deployment" { } } + dynamic "volume_mount" { + for_each = toset(var.emptydir_volumes.items) + content { + # TODO FIXME do we want the mount path to be configurable???? + mount_path = "/var/${volume_mount.name}" + name = volume_mount.name + } + } + liveness_probe { http_get { path = var.health_check_path @@ -524,14 +533,24 @@ resource "kubernetes_deployment_v1" "deployment" { } dynamic "volume" { - for_each = toset(var.additional_volumes_from_config_maps.items) + for_each = toset(var.additional_volumes_from_secrets.items) content { - config_map { - name = volume.value + secret { + secret_name = volume.value } name = volume.value } } + + dynamic "volume" { + for_each = toset(var.emptydir_volumes.items) + content { + empty_dir { + size_limit = volume.parameters.size_limit + } + name = volume.name + } + } } } } diff --git a/terraform/modules/happy-service-eks/variables.tf b/terraform/modules/happy-service-eks/variables.tf index 67cc7cf487..dd649b6f90 100644 --- a/terraform/modules/happy-service-eks/variables.tf +++ b/terraform/modules/happy-service-eks/variables.tf @@ -252,6 +252,17 @@ variable "additional_volumes_from_config_maps" { description = "Additional volumes to add to the container from the following config maps" } +variable "emptydir_volumes" { + type = list(object({ + name : string, + parameters :object({ + size_limit : optional(string, "500mi"), + }) + })) + default = [] + description = "define any emptyDir volumes to make available to the pod" +} + variable "routing" { type = object({ method : optional(string, "DOMAIN") diff --git a/terraform/modules/happy-stack-eks/main.tf b/terraform/modules/happy-stack-eks/main.tf index 6ebfcd605f..ce49bf2ed4 100644 --- a/terraform/modules/happy-stack-eks/main.tf +++ b/terraform/modules/happy-stack-eks/main.tf @@ -223,6 +223,8 @@ module "services" { additional_volumes_from_config_maps = var.additional_volumes_from_config_maps additional_pod_labels = var.additional_pod_labels + emptydir_volumes = var.emptydir_volumes + tags = local.secret["tags"] regional_wafv2_arn = local.regional_waf_arn @@ -253,5 +255,6 @@ module "tasks" { additional_env_vars_from_secrets = var.additional_env_vars_from_secrets additional_volumes_from_secrets = var.additional_volumes_from_secrets additional_volumes_from_config_maps = var.additional_volumes_from_config_maps + } diff --git a/terraform/modules/happy-stack-eks/variables.tf b/terraform/modules/happy-stack-eks/variables.tf index a8cf89e248..9747899642 100644 --- a/terraform/modules/happy-stack-eks/variables.tf +++ b/terraform/modules/happy-stack-eks/variables.tf @@ -253,6 +253,17 @@ variable "additional_env_vars_from_secrets" { description = "Additional environment variables to add to the container from the following secrets" } +variable "emptydir_volumes" { + type = list(object({ + name : string, + parameters :object({ + size_limit : optional(string, "500mi"), + }) + })) + default = [] + description = "define any emptyDir volumes to make available to the pod" +} + variable "additional_volumes_from_secrets" { type = object({ items : optional(list(string), []), From 7fc730c3982b1c558302d33bdd7a48b5e660cc76 Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Wed, 24 Jan 2024 09:50:07 -0800 Subject: [PATCH 02/13] fix emptydir_volumes list --- terraform/modules/happy-service-eks/main.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/terraform/modules/happy-service-eks/main.tf b/terraform/modules/happy-service-eks/main.tf index 484d591034..dfec555ef7 100644 --- a/terraform/modules/happy-service-eks/main.tf +++ b/terraform/modules/happy-service-eks/main.tf @@ -292,11 +292,11 @@ resource "kubernetes_deployment_v1" "deployment" { } dynamic "volume_mount" { - for_each = toset(var.emptydir_volumes.items) + for_each = toset(var.emptydir_volumes) content { # TODO FIXME do we want the mount path to be configurable???? - mount_path = "/var/${volume_mount.name}" - name = volume_mount.name + mount_path = "/var/${volume_mount.value.name}" + name = volume_mount.value.name } } @@ -543,12 +543,12 @@ resource "kubernetes_deployment_v1" "deployment" { } dynamic "volume" { - for_each = toset(var.emptydir_volumes.items) + for_each = toset(var.emptydir_volumes) content { empty_dir { - size_limit = volume.parameters.size_limit + size_limit = volume.value.parameters.size_limit } - name = volume.name + name = volume.value.name } } } From b3ae716e4ea84c9afa2fb992a441d0e280aefc7c Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Wed, 24 Jan 2024 13:07:59 -0800 Subject: [PATCH 03/13] add emptydir_volumes to tasks --- terraform/modules/happy-stack-eks/main.tf | 1 + terraform/modules/happy-task-eks/main.tf | 10 +++++++++- terraform/modules/happy-task-eks/variables.tf | 12 ++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/terraform/modules/happy-stack-eks/main.tf b/terraform/modules/happy-stack-eks/main.tf index ce49bf2ed4..f729aae138 100644 --- a/terraform/modules/happy-stack-eks/main.tf +++ b/terraform/modules/happy-stack-eks/main.tf @@ -254,6 +254,7 @@ module "tasks" { additional_env_vars_from_config_maps = var.additional_env_vars_from_config_maps additional_env_vars_from_secrets = var.additional_env_vars_from_secrets additional_volumes_from_secrets = var.additional_volumes_from_secrets + emptydir_volumes = var.emptydir_volumes additional_volumes_from_config_maps = var.additional_volumes_from_config_maps } diff --git a/terraform/modules/happy-task-eks/main.tf b/terraform/modules/happy-task-eks/main.tf index 073cf926c4..12696d803f 100644 --- a/terraform/modules/happy-task-eks/main.tf +++ b/terraform/modules/happy-task-eks/main.tf @@ -102,7 +102,15 @@ resource "kubernetes_cron_job_v1" "task_definition" { read_only = true } } - + dynamic "volume_mount" { + for_each = toset(var.emptydir_volumes) + content { + # TODO FIXME do we want the mount path to be configurable???? + mount_path = "/var/${volume_mount.value.name}" + name = volume_mount.value.name + } + } + dynamic "volume_mount" { for_each = toset(var.additional_volumes_from_config_maps.items) content { diff --git a/terraform/modules/happy-task-eks/variables.tf b/terraform/modules/happy-task-eks/variables.tf index 96c9055f72..c302c2b00d 100644 --- a/terraform/modules/happy-task-eks/variables.tf +++ b/terraform/modules/happy-task-eks/variables.tf @@ -184,8 +184,16 @@ variable "additional_volumes_from_config_maps" { } description = "Additional volumes to add to the container from the following config maps" } - - +variable "emptydir_volumes" { + type = list(object({ + name : string, + parameters :object({ + size_limit : optional(string, "500mi"), + }) + })) + default = [] + description = "define any emptyDir volumes to make available to the pod" +} variable "eks_cluster" { type = object({ cluster_id : string, From 821c2e0f06b764b92d6366d16c3691a7e23e3b6d Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Wed, 24 Jan 2024 13:55:24 -0800 Subject: [PATCH 04/13] Revert "add emptydir_volumes to tasks" This reverts commit b3ae716e4ea84c9afa2fb992a441d0e280aefc7c. --- terraform/modules/happy-stack-eks/main.tf | 1 - terraform/modules/happy-task-eks/main.tf | 10 +--------- terraform/modules/happy-task-eks/variables.tf | 12 ++---------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/terraform/modules/happy-stack-eks/main.tf b/terraform/modules/happy-stack-eks/main.tf index f729aae138..ce49bf2ed4 100644 --- a/terraform/modules/happy-stack-eks/main.tf +++ b/terraform/modules/happy-stack-eks/main.tf @@ -254,7 +254,6 @@ module "tasks" { additional_env_vars_from_config_maps = var.additional_env_vars_from_config_maps additional_env_vars_from_secrets = var.additional_env_vars_from_secrets additional_volumes_from_secrets = var.additional_volumes_from_secrets - emptydir_volumes = var.emptydir_volumes additional_volumes_from_config_maps = var.additional_volumes_from_config_maps } diff --git a/terraform/modules/happy-task-eks/main.tf b/terraform/modules/happy-task-eks/main.tf index 12696d803f..073cf926c4 100644 --- a/terraform/modules/happy-task-eks/main.tf +++ b/terraform/modules/happy-task-eks/main.tf @@ -102,15 +102,7 @@ resource "kubernetes_cron_job_v1" "task_definition" { read_only = true } } - dynamic "volume_mount" { - for_each = toset(var.emptydir_volumes) - content { - # TODO FIXME do we want the mount path to be configurable???? - mount_path = "/var/${volume_mount.value.name}" - name = volume_mount.value.name - } - } - + dynamic "volume_mount" { for_each = toset(var.additional_volumes_from_config_maps.items) content { diff --git a/terraform/modules/happy-task-eks/variables.tf b/terraform/modules/happy-task-eks/variables.tf index c302c2b00d..96c9055f72 100644 --- a/terraform/modules/happy-task-eks/variables.tf +++ b/terraform/modules/happy-task-eks/variables.tf @@ -184,16 +184,8 @@ variable "additional_volumes_from_config_maps" { } description = "Additional volumes to add to the container from the following config maps" } -variable "emptydir_volumes" { - type = list(object({ - name : string, - parameters :object({ - size_limit : optional(string, "500mi"), - }) - })) - default = [] - description = "define any emptyDir volumes to make available to the pod" -} + + variable "eks_cluster" { type = object({ cluster_id : string, From bdd5fdd3ddd6fcbb48772fb582eabdaaa526199e Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Wed, 24 Jan 2024 13:57:25 -0800 Subject: [PATCH 05/13] remove prev commit, add mounts to emptydir --- terraform/modules/happy-service-eks/main.tf | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/terraform/modules/happy-service-eks/main.tf b/terraform/modules/happy-service-eks/main.tf index dfec555ef7..d16e2c5eb3 100644 --- a/terraform/modules/happy-service-eks/main.tf +++ b/terraform/modules/happy-service-eks/main.tf @@ -379,7 +379,14 @@ resource "kubernetes_deployment_v1" "deployment" { } } } - + dynamic "volume_mount" { + for_each = toset(var.emptydir_volumes) + content { + # TODO FIXME do we want the mount path to be configurable???? + mount_path = "/var/${volume_mount.value.name}" + name = volume_mount.value.name + } + } dynamic "env" { for_each = var.additional_env_vars content { @@ -456,7 +463,14 @@ resource "kubernetes_deployment_v1" "deployment" { read_only = true } } - + dynamic "volume_mount" { + for_each = toset(var.emptydir_volumes) + content { + # TODO FIXME do we want the mount path to be configurable???? + mount_path = "/var/${volume_mount.value.name}" + name = volume_mount.value.name + } + } env { name = "DEPLOYMENT_STAGE" value = var.deployment_stage From 789092028504b9ed4e1f9e34dc7a04d6ce61e119 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Jan 2024 23:30:20 +0000 Subject: [PATCH 06/13] commit from ci -- ran terraform-docs and pushed --- terraform/modules/happy-stack-eks/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/modules/happy-stack-eks/README.md b/terraform/modules/happy-stack-eks/README.md index be3bd4f392..8d163341d2 100644 --- a/terraform/modules/happy-stack-eks/README.md +++ b/terraform/modules/happy-stack-eks/README.md @@ -55,6 +55,7 @@ | [app\_name](#input\_app\_name) | The happy application name | `string` | `""` | no | | [create\_dashboard](#input\_create\_dashboard) | Create a dashboard for this stack | `bool` | `false` | no | | [deployment\_stage](#input\_deployment\_stage) | Deployment stage for the app | `string` | n/a | yes | +| [emptydir\_volumes](#input\_emptydir\_volumes) | define any emptyDir volumes to make available to the pod |
list(object({
name : string,
parameters :object({
size_limit : optional(string, "500mi"),
})
}))
| `[]` | no | | [enable\_service\_mesh](#input\_enable\_service\_mesh) | Enable service mesh for this stack | `bool` | `false` | no | | [image\_tag](#input\_image\_tag) | Please provide a default image tag | `string` | n/a | yes | | [image\_tags](#input\_image\_tags) | Override image tag for each docker image | `map(string)` | `{}` | no | From 9ab9ab9249663abae6f59ba8c8e971e408417e26 Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Wed, 24 Jan 2024 15:52:34 -0800 Subject: [PATCH 07/13] fix messed up merge --- terraform/modules/happy-service-eks/variables.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/modules/happy-service-eks/variables.tf b/terraform/modules/happy-service-eks/variables.tf index 8b8dac006a..13cfdc4c33 100644 --- a/terraform/modules/happy-service-eks/variables.tf +++ b/terraform/modules/happy-service-eks/variables.tf @@ -261,6 +261,7 @@ variable "emptydir_volumes" { })) default = [] description = "define any emptyDir volumes to make available to the pod" +} variable "progress_deadline_seconds" { type = number From d5f3dadb57b5cd76c25fb7811ede4e1088a1d21a Mon Sep 17 00:00:00 2001 From: rzlim08 Date: Wed, 24 Jan 2024 23:59:04 +0000 Subject: [PATCH 08/13] commit from ci -- ran terraform fmt and pushed --- terraform/modules/happy-stack-eks/main.tf | 2 +- terraform/modules/happy-stack-eks/variables.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/modules/happy-stack-eks/main.tf b/terraform/modules/happy-stack-eks/main.tf index 114580790b..c64791ff2e 100644 --- a/terraform/modules/happy-stack-eks/main.tf +++ b/terraform/modules/happy-stack-eks/main.tf @@ -226,7 +226,7 @@ module "services" { additional_volumes_from_config_maps = var.additional_volumes_from_config_maps additional_pod_labels = var.additional_pod_labels - emptydir_volumes = var.emptydir_volumes + emptydir_volumes = var.emptydir_volumes tags = local.secret["tags"] diff --git a/terraform/modules/happy-stack-eks/variables.tf b/terraform/modules/happy-stack-eks/variables.tf index ab3daf03c2..40f0e5907c 100644 --- a/terraform/modules/happy-stack-eks/variables.tf +++ b/terraform/modules/happy-stack-eks/variables.tf @@ -263,11 +263,11 @@ variable "additional_env_vars_from_secrets" { variable "emptydir_volumes" { type = list(object({ name : string, - parameters :object({ + parameters : object({ size_limit : optional(string, "500mi"), }) })) - default = [] + default = [] description = "define any emptyDir volumes to make available to the pod" } From b0c9c47162d12a6ebbf5489eb3929da099af7ca6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Jan 2024 00:01:00 +0000 Subject: [PATCH 09/13] commit from ci -- ran terraform-docs and pushed --- terraform/modules/happy-stack-eks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/modules/happy-stack-eks/README.md b/terraform/modules/happy-stack-eks/README.md index 8d163341d2..22074da142 100644 --- a/terraform/modules/happy-stack-eks/README.md +++ b/terraform/modules/happy-stack-eks/README.md @@ -55,7 +55,7 @@ | [app\_name](#input\_app\_name) | The happy application name | `string` | `""` | no | | [create\_dashboard](#input\_create\_dashboard) | Create a dashboard for this stack | `bool` | `false` | no | | [deployment\_stage](#input\_deployment\_stage) | Deployment stage for the app | `string` | n/a | yes | -| [emptydir\_volumes](#input\_emptydir\_volumes) | define any emptyDir volumes to make available to the pod |
list(object({
name : string,
parameters :object({
size_limit : optional(string, "500mi"),
})
}))
| `[]` | no | +| [emptydir\_volumes](#input\_emptydir\_volumes) | define any emptyDir volumes to make available to the pod |
list(object({
name : string,
parameters : object({
size_limit : optional(string, "500mi"),
})
}))
| `[]` | no | | [enable\_service\_mesh](#input\_enable\_service\_mesh) | Enable service mesh for this stack | `bool` | `false` | no | | [image\_tag](#input\_image\_tag) | Please provide a default image tag | `string` | n/a | yes | | [image\_tags](#input\_image\_tags) | Override image tag for each docker image | `map(string)` | `{}` | no | From e659e02aa22557f6ebc5275dbb11193365d96fbd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Jan 2024 00:02:34 +0000 Subject: [PATCH 10/13] commit from ci -- ran terraform-docs and pushed --- terraform/modules/happy-service-eks/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/modules/happy-service-eks/README.md b/terraform/modules/happy-service-eks/README.md index fdd963afa8..140d2d316f 100644 --- a/terraform/modules/happy-service-eks/README.md +++ b/terraform/modules/happy-service-eks/README.md @@ -65,6 +65,7 @@ | [deployment\_stage](#input\_deployment\_stage) | The name of the deployment stage of the Application | `string` | `"dev"` | no | | [desired\_count](#input\_desired\_count) | How many instances of this task should we run across our cluster? | `number` | `2` | no | | [eks\_cluster](#input\_eks\_cluster) | eks-cluster module output |
object({
cluster_id : string,
cluster_arn : string,
cluster_endpoint : string,
cluster_ca : string,
cluster_oidc_issuer_url : string,
cluster_version : string,
worker_iam_role_name : string,
worker_security_group : string,
oidc_provider_arn : string,
})
| n/a | yes | +| [emptydir\_volumes](#input\_emptydir\_volumes) | define any emptyDir volumes to make available to the pod |
list(object({
name : string,
parameters :object({
size_limit : optional(string, "500mi"),
})
}))
| `[]` | no | | [gpu](#input\_gpu) | Number of GPUs per pod, 0 allocates all available GPUs | `number` | `null` | no | | [gpu\_requests](#input\_gpu\_requests) | Number of GPUs requested per pod, 0 allocates all available GPUs | `number` | `null` | no | | [health\_check\_path](#input\_health\_check\_path) | path to use for health checks | `string` | `"/"` | no | From 94497d153736bce3125a77857b8e204d90c54267 Mon Sep 17 00:00:00 2001 From: "czi-github-helper[bot]" Date: Thu, 25 Jan 2024 00:04:14 +0000 Subject: [PATCH 11/13] commit from ci -- ran terraform fmt and pushed --- terraform/modules/happy-service-eks/main.tf | 2 +- terraform/modules/happy-service-eks/variables.tf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/modules/happy-service-eks/main.tf b/terraform/modules/happy-service-eks/main.tf index 817350b934..63bc5f8b76 100644 --- a/terraform/modules/happy-service-eks/main.tf +++ b/terraform/modules/happy-service-eks/main.tf @@ -481,7 +481,7 @@ resource "kubernetes_deployment_v1" "deployment" { mount_path = "/var/${volume_mount.value.name}" name = volume_mount.value.name } - } + } env { name = "DEPLOYMENT_STAGE" value = var.deployment_stage diff --git a/terraform/modules/happy-service-eks/variables.tf b/terraform/modules/happy-service-eks/variables.tf index 13cfdc4c33..6f1aabda33 100644 --- a/terraform/modules/happy-service-eks/variables.tf +++ b/terraform/modules/happy-service-eks/variables.tf @@ -255,14 +255,14 @@ variable "additional_volumes_from_config_maps" { variable "emptydir_volumes" { type = list(object({ name : string, - parameters :object({ + parameters : object({ size_limit : optional(string, "500mi"), }) })) - default = [] + default = [] description = "define any emptyDir volumes to make available to the pod" } - + variable "progress_deadline_seconds" { type = number description = "The maximum time in seconds for a deployment to make progress before it is considered to be failed. Defaults to 600 seconds." From 8a20a1e20b9bb22d5ae0b32c54847cc90cd8c529 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Jan 2024 00:07:30 +0000 Subject: [PATCH 12/13] commit from ci -- ran terraform-docs and pushed --- terraform/modules/happy-service-eks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/modules/happy-service-eks/README.md b/terraform/modules/happy-service-eks/README.md index 140d2d316f..4169eefc4a 100644 --- a/terraform/modules/happy-service-eks/README.md +++ b/terraform/modules/happy-service-eks/README.md @@ -65,7 +65,7 @@ | [deployment\_stage](#input\_deployment\_stage) | The name of the deployment stage of the Application | `string` | `"dev"` | no | | [desired\_count](#input\_desired\_count) | How many instances of this task should we run across our cluster? | `number` | `2` | no | | [eks\_cluster](#input\_eks\_cluster) | eks-cluster module output |
object({
cluster_id : string,
cluster_arn : string,
cluster_endpoint : string,
cluster_ca : string,
cluster_oidc_issuer_url : string,
cluster_version : string,
worker_iam_role_name : string,
worker_security_group : string,
oidc_provider_arn : string,
})
| n/a | yes | -| [emptydir\_volumes](#input\_emptydir\_volumes) | define any emptyDir volumes to make available to the pod |
list(object({
name : string,
parameters :object({
size_limit : optional(string, "500mi"),
})
}))
| `[]` | no | +| [emptydir\_volumes](#input\_emptydir\_volumes) | define any emptyDir volumes to make available to the pod |
list(object({
name : string,
parameters : object({
size_limit : optional(string, "500mi"),
})
}))
| `[]` | no | | [gpu](#input\_gpu) | Number of GPUs per pod, 0 allocates all available GPUs | `number` | `null` | no | | [gpu\_requests](#input\_gpu\_requests) | Number of GPUs requested per pod, 0 allocates all available GPUs | `number` | `null` | no | | [health\_check\_path](#input\_health\_check\_path) | path to use for health checks | `string` | `"/"` | no | From 10b86e1984df0953438e0d4457f5d347972e7812 Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Thu, 25 Jan 2024 17:05:26 -0800 Subject: [PATCH 13/13] fix comments --- terraform/modules/happy-service-eks/main.tf | 9 +++------ terraform/modules/happy-stack-eks/main.tf | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/terraform/modules/happy-service-eks/main.tf b/terraform/modules/happy-service-eks/main.tf index 63bc5f8b76..a93cb89dde 100644 --- a/terraform/modules/happy-service-eks/main.tf +++ b/terraform/modules/happy-service-eks/main.tf @@ -305,7 +305,6 @@ resource "kubernetes_deployment_v1" "deployment" { dynamic "volume_mount" { for_each = toset(var.emptydir_volumes) content { - # TODO FIXME do we want the mount path to be configurable???? mount_path = "/var/${volume_mount.value.name}" name = volume_mount.value.name } @@ -393,7 +392,6 @@ resource "kubernetes_deployment_v1" "deployment" { dynamic "volume_mount" { for_each = toset(var.emptydir_volumes) content { - # TODO FIXME do we want the mount path to be configurable???? mount_path = "/var/${volume_mount.value.name}" name = volume_mount.value.name } @@ -477,7 +475,6 @@ resource "kubernetes_deployment_v1" "deployment" { dynamic "volume_mount" { for_each = toset(var.emptydir_volumes) content { - # TODO FIXME do we want the mount path to be configurable???? mount_path = "/var/${volume_mount.value.name}" name = volume_mount.value.name } @@ -558,10 +555,10 @@ resource "kubernetes_deployment_v1" "deployment" { } dynamic "volume" { - for_each = toset(var.additional_volumes_from_secrets.items) + for_each = toset(var.additional_volumes_from_config_maps.items) content { - secret { - secret_name = volume.value + config_map { + name = volume.value } name = volume.value } diff --git a/terraform/modules/happy-stack-eks/main.tf b/terraform/modules/happy-stack-eks/main.tf index c64791ff2e..b77ae33f97 100644 --- a/terraform/modules/happy-stack-eks/main.tf +++ b/terraform/modules/happy-stack-eks/main.tf @@ -258,6 +258,5 @@ module "tasks" { additional_env_vars_from_secrets = var.additional_env_vars_from_secrets additional_volumes_from_secrets = var.additional_volumes_from_secrets additional_volumes_from_config_maps = var.additional_volumes_from_config_maps - }