Skip to content

Commit c74ccb5

Browse files
committed
Add support for environmentd extra args
1 parent 7a9b3b9 commit c74ccb5

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ No modules.
7777
| <a name="input_helm_repository"></a> [helm\_repository](#input\_helm\_repository) | Repository URL for the Materialize operator Helm chart. Leave empty if using local chart. | `string` | `"https://materializeinc.github.io/materialize/"` | no |
7878
| <a name="input_helm_values"></a> [helm\_values](#input\_helm\_values) | Values to pass to the Helm chart | `any` | n/a | yes |
7979
| <a name="input_install_metrics_server"></a> [install\_metrics\_server](#input\_install\_metrics\_server) | Whether to install the metrics-server | `bool` | `true` | no |
80-
| <a name="input_instances"></a> [instances](#input\_instances) | Configuration for Materialize instances | <pre>list(object({<br/> name = string<br/> namespace = optional(string)<br/> create_database = optional(bool, true)<br/> database_name = string<br/> metadata_backend_url = string<br/> persist_backend_url = string<br/> license_key = optional(string)<br/> environmentd_version = optional(string, "v0.130.12") # META: mz version<br/> environmentd_extra_env = optional(list(object({<br/> name = string<br/> value = string<br/> })), [])<br/> cpu_request = optional(string, "1")<br/> memory_request = optional(string, "1Gi")<br/> memory_limit = optional(string, "1Gi")<br/> in_place_rollout = optional(bool, true)<br/> request_rollout = optional(string, "00000000-0000-0000-0000-000000000001")<br/> force_rollout = optional(string, "00000000-0000-0000-0000-000000000001")<br/> balancer_memory_request = optional(string, "256Mi")<br/> balancer_memory_limit = optional(string, "256Mi")<br/> balancer_cpu_request = optional(string, "100m")<br/> }))</pre> | `[]` | no |
80+
| <a name="input_instances"></a> [instances](#input\_instances) | Configuration for Materialize instances | <pre>list(object({<br/> name = string<br/> namespace = optional(string)<br/> create_database = optional(bool, true)<br/> database_name = string<br/> metadata_backend_url = string<br/> persist_backend_url = string<br/> license_key = optional(string)<br/> environmentd_version = optional(string, "v0.130.12") # META: mz version<br/> environmentd_extra_env = optional(list(object({<br/> name = string<br/> value = string<br/> })), [])<br/> environmentd_extra_args = optional(list(object({<br/> name = string<br/> value = string<br/> })), [])<br/> cpu_request = optional(string, "1")<br/> memory_request = optional(string, "1Gi")<br/> memory_limit = optional(string, "1Gi")<br/> in_place_rollout = optional(bool, true)<br/> request_rollout = optional(string, "00000000-0000-0000-0000-000000000001")<br/> force_rollout = optional(string, "00000000-0000-0000-0000-000000000001")<br/> balancer_memory_request = optional(string, "256Mi")<br/> balancer_memory_limit = optional(string, "256Mi")<br/> balancer_cpu_request = optional(string, "100m")<br/> }))</pre> | `[]` | no |
8181
| <a name="input_metrics_server_version"></a> [metrics\_server\_version](#input\_metrics\_server\_version) | Version of metrics-server to install | `string` | `"3.12.2"` | no |
8282
| <a name="input_monitoring_namespace"></a> [monitoring\_namespace](#input\_monitoring\_namespace) | Namespace for monitoring resources | `string` | `"monitoring"` | no |
8383
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace prefix for all resources | `string` | n/a | yes |

main.tf

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ locals {
1212
}
1313
] : null
1414
}
15+
16+
format_env_args = {
17+
for instance in var.instances : instance.name =>
18+
length(lookup(instance, "environmentd_extra_args", [])) > 0 ? [
19+
for item in instance.environmentd_extra_args :
20+
"--system-parameter-default=${item.name}=${item.value}"
21+
] : null
22+
}
1523
}
1624

1725
resource "kubernetes_namespace" "materialize" {
@@ -98,7 +106,8 @@ resource "kubernetes_manifest" "materialize_instances" {
98106
requestRollout = lookup(each.value, "request_rollout", null)
99107
forceRollout = lookup(each.value, "force_rollout", null)
100108

101-
environmentdExtraEnv = lookup(local.format_env_vars, each.key, null)
109+
environmentdExtraEnv = lookup(local.format_env_vars, each.key, null)
110+
environmentdExtraArgs = lookup(local.format_env_args, each.key, null)
102111

103112
environmentdResourceRequirements = {
104113
limits = {

variables.tf

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ variable "instances" {
7777
name = string
7878
value = string
7979
})), [])
80+
environmentd_extra_args = optional(list(object({
81+
name = string
82+
value = string
83+
})), [])
8084
cpu_request = optional(string, "1")
8185
memory_request = optional(string, "1Gi")
8286
memory_limit = optional(string, "1Gi")

0 commit comments

Comments
 (0)