From b7095c248fa8637aaa79ec3d769c951196a8f907 Mon Sep 17 00:00:00 2001 From: Florian Lemaitre Date: Mon, 29 Jan 2024 11:36:31 +0100 Subject: [PATCH 1/2] Add ramdisk support for compute plane cache --- armonik/compute-plane.tf | 5 ++++- armonik/variables.tf | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/armonik/compute-plane.tf b/armonik/compute-plane.tf index 13b9be6b3..553a4e1de 100644 --- a/armonik/compute-plane.tf +++ b/armonik/compute-plane.tf @@ -181,7 +181,10 @@ resource "kubernetes_deployment" "compute_plane" { } volume { name = "cache-volume" - empty_dir {} + empty_dir { + medium = try(each.value.cache_config.memory ? "Memory" : null, null) + size_limit = try(each.value.cache_config.size_limit, null) + } } dynamic "volume" { for_each = (local.file_storage_type == "nfs" ? [1] : []) diff --git a/armonik/variables.tf b/armonik/variables.tf index cc45e3eb3..4a718750b 100644 --- a/armonik/variables.tf +++ b/armonik/variables.tf @@ -285,6 +285,10 @@ variable "compute_plane" { memory = string }) })) + cache_config = object({ + memory = bool + size_limit = string # if larger than supported, the max value for the node will be used instead + }) hpa = any })) } From 83719060fcbac0ca170f8a6834568d388d19343a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Feb 2024 16:57:08 +0000 Subject: [PATCH 2/2] terraform-docs: automated action --- armonik/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armonik/README.md b/armonik/README.md index 5e1c1cbe6..2007b9222 100644 --- a/armonik/README.md +++ b/armonik/README.md @@ -107,7 +107,7 @@ | [chart\_name](#input\_chart\_name) | Name for chart | `string` | `"keda-hpa"` | no | | [chart\_version](#input\_chart\_version) | Version for chart | `string` | `"0.1.0"` | no | | [charts\_repository](#input\_charts\_repository) | Path to the charts repository | `string` | `"../charts"` | no | -| [compute\_plane](#input\_compute\_plane) | Parameters of the compute plane |
map(object({
partition_data = object({
priority = number
reserved_pods = number
max_pods = number
preemption_percentage = number
parent_partition_ids = list(string)
pod_configuration = any
})
replicas = number
termination_grace_period_seconds = number
image_pull_secrets = string
node_selector = any
annotations = any
service_account_name = string
polling_agent = object({
image = string
tag = string
image_pull_policy = string
limits = object({
cpu = string
memory = string
})
requests = object({
cpu = string
memory = string
})
})
worker = list(object({
name = string
image = string
tag = string
image_pull_policy = string
limits = object({
cpu = string
memory = string
})
requests = object({
cpu = string
memory = string
})
}))
hpa = any
}))
| n/a | yes | +| [compute\_plane](#input\_compute\_plane) | Parameters of the compute plane |
map(object({
partition_data = object({
priority = number
reserved_pods = number
max_pods = number
preemption_percentage = number
parent_partition_ids = list(string)
pod_configuration = any
})
replicas = number
termination_grace_period_seconds = number
image_pull_secrets = string
node_selector = any
annotations = any
service_account_name = string
polling_agent = object({
image = string
tag = string
image_pull_policy = string
limits = object({
cpu = string
memory = string
})
requests = object({
cpu = string
memory = string
})
})
worker = list(object({
name = string
image = string
tag = string
image_pull_policy = string
limits = object({
cpu = string
memory = string
})
requests = object({
cpu = string
memory = string
})
}))
cache_config = object({
memory = bool
size_limit = string # if larger than supported, the max value for the node will be used instead
})
hpa = any
}))
| n/a | yes | | [control\_plane](#input\_control\_plane) | Parameters of the control plane |
object({
name = string
service_type = string
replicas = number
image = string
tag = string
image_pull_policy = string
port = number
limits = object({
cpu = string
memory = string
})
requests = object({
cpu = string
memory = string
})
image_pull_secrets = string
node_selector = any
annotations = any
hpa = any
default_partition = string
service_account_name = string
})
| n/a | yes | | [deployed\_object\_storage\_secret\_name](#input\_deployed\_object\_storage\_secret\_name) | the name of the deployed-object-storage secret | `string` | `"deployed-object-storage"` | no | | [deployed\_queue\_storage\_secret\_name](#input\_deployed\_queue\_storage\_secret\_name) | the name of the deployed-queue-storage secret | `string` | `"deployed-queue-storage"` | no |