-
Notifications
You must be signed in to change notification settings - Fork 0
/
fn.tf
69 lines (57 loc) · 1.53 KB
/
fn.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
resource "null_resource" "init_fn" {
provisioner "local-exec" {
command = "rm -rf fn-helm && git clone https://github.com/fnproject/fn-helm.git && helm dependency update fn-helm/fn"
}
}
data "template_file" "fn-config" {
template = "${file("${path.module}/fn-values.yaml")}"
}
// TODO: Enable metrics in Grafana dashboard.
resource "helm_release" "fn" {
name = "fn"
chart = "fn-helm/fn"
depends_on = ["null_resource.init_fn",
"helm_release.cert-manager"]
namespace = "${var.namespace_fn}"
wait = true
set {
name = "nameOverride"
value = "${var.fn_cluster_name}"
}
set {
name = "fn_lb_runner.service.port"
value = "443"
}
set {
name = "fn_lb_runner.service.ingress_hostname"
value = "lb.${var.dns_zone}"
}
set {
name = "fn_api.service.ingress_hostname"
value = "api.${var.dns_zone}"
}
set {
name = "ui.service.ingress_hostname"
value = "ui.${var.dns_zone}"
}
// TODO: Make resource requests and limits configurable.
set {
name = "fn_runner.resources.requests.cpu"
value = "200m"
}
set {
name = "fn_runner.resources.requests.memory"
value = "16Gi"
}
set {
name = "fn_runner.resources.limits.cpu"
value = "200m"
}
set {
name = "fn_runner.resources.limits.memory"
value = "16Gi"
}
values = [
"${data.template_file.fn-config.rendered}"
]
}