File tree 5 files changed +47
-27
lines changed
5 files changed +47
-27
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,31 @@ variable "resources" {
55
55
}
56
56
}
57
57
58
-
59
- variable "compute_arch" {
60
- type = string
61
- }
58
+ variable "tolerations" {
59
+ description = " List of tolerations for the instance"
60
+ type = list (object ({
61
+ effect = string
62
+ key = string
63
+ operator = string
64
+ value = optional (string )
65
+ }))
66
+ default = [
67
+ {
68
+ effect = " NoSchedule"
69
+ key = " demeter.run/compute-profile"
70
+ operator = " Exists"
71
+ },
72
+ {
73
+ effect = " NoSchedule"
74
+ key = " demeter.run/compute-arch"
75
+ operator = " Equal"
76
+ value = " x86"
77
+ },
78
+ {
79
+ effect = " NoSchedule"
80
+ key = " demeter.run/availability-sla"
81
+ operator = " Equal"
82
+ value = " consistent"
83
+ }
84
+ ]
85
+ }
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ resource "kubernetes_deployment_v1" "ogmios" {
62
62
name = " main"
63
63
image = local. image
64
64
image_pull_policy = " IfNotPresent"
65
- args = local. container_args
65
+ args = local. container_args
66
66
67
67
resources {
68
68
limits = {
@@ -137,24 +137,14 @@ resource "kubernetes_deployment_v1" "ogmios" {
137
137
}
138
138
}
139
139
140
- toleration {
141
- effect = " NoSchedule"
142
- key = " demeter.run/compute-profile"
143
- operator = " Exists"
144
- }
145
-
146
- toleration {
147
- effect = " NoSchedule"
148
- key = " demeter.run/compute-arch"
149
- operator = " Equal"
150
- value = var. compute_arch
151
- }
152
-
153
- toleration {
154
- effect = " NoSchedule"
155
- key = " demeter.run/availability-sla"
156
- operator = " Equal"
157
- value = " consistent"
140
+ dynamic "toleration" {
141
+ for_each = var. tolerations
142
+ content {
143
+ effect = toleration. value . effect
144
+ key = toleration. value . key
145
+ operator = toleration. value . operator
146
+ value = toleration. value . value
147
+ }
158
148
}
159
149
}
160
150
}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ module "ogmios_instances" {
75
75
ogmios_image = each. value . ogmios_image
76
76
node_private_dns = each. value . node_private_dns
77
77
ogmios_version = each. value . ogmios_version
78
- compute_arch = each. value . compute_arch
78
+ tolerations = each. value . tolerations
79
79
replicas = each. value . replicas
80
80
}
81
81
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ resource "kubernetes_service_v1" "proxy_service_aws" {
7
7
" service.beta.kubernetes.io/aws-load-balancer-nlb-target-type" : " instance"
8
8
" service.beta.kubernetes.io/aws-load-balancer-scheme" : " internet-facing"
9
9
" service.beta.kubernetes.io/aws-load-balancer-type" : " external"
10
- " service.beta.kubernetes.io/aws-load-balancer-healthcheck-protocol" : " HTTP "
10
+ " service.beta.kubernetes.io/aws-load-balancer-healthcheck-protocol" : " HTTPS "
11
11
" service.beta.kubernetes.io/aws-load-balancer-healthcheck-path" : " /healthz"
12
12
" service.beta.kubernetes.io/aws-load-balancer-healthcheck-port" : var.healthcheck_port != null ? var.healthcheck_port : " traffic-port"
13
13
}
@@ -19,7 +19,7 @@ resource "kubernetes_service_v1" "proxy_service_aws" {
19
19
20
20
port {
21
21
name = " proxy"
22
- port = 9443
22
+ port = 443
23
23
target_port = local. proxy_port
24
24
protocol = " TCP"
25
25
}
@@ -52,7 +52,7 @@ resource "kubernetes_service_v1" "proxy_service_gcp" {
52
52
53
53
port {
54
54
name = " proxy"
55
- port = 9443
55
+ port = 443
56
56
target_port = local. proxy_port
57
57
protocol = " TCP"
58
58
}
Original file line number Diff line number Diff line change @@ -157,5 +157,11 @@ variable "instances" {
157
157
memory = string
158
158
})
159
159
}))
160
+ tolerations = optional (list (object ({
161
+ effect = string
162
+ key = string
163
+ operator = string
164
+ value = optional (string )
165
+ })))
160
166
}))
161
167
}
You can’t perform that action at this time.
0 commit comments