-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode.tf
41 lines (38 loc) · 945 Bytes
/
node.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
locals {
node_values = {
core = {
replicaCount = var.node_replicas
}
database = {
uri = var.database_uri
}
redis = {
enable = var.redis_enable
endpoints = [var.redis_enable ? var.redis_endpoint : null]
username = var.redis_enable ? var.redis_username : null
password = var.redis_enable ? var.redis_password : null
disable_cache = true
tls = {
enabled = false
}
}
endpoints = var.node_rpc_endpoints
workers = var.node_workers
broadcaster = {
enabled = var.node_register
}
configs = {
discovery = var.node_register_config
}
}
}
resource "helm_release" "node" {
name = "node"
namespace = var.namespace
repository = "https://rss3-network.github.io/helm-charts"
chart = "node"
version = "0.4.7"
values = concat([
yamlencode(local.node_values)
], var.node_values)
}