-
Notifications
You must be signed in to change notification settings - Fork 2
/
konghq.tf
75 lines (61 loc) · 1.81 KB
/
konghq.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
70
71
72
73
74
75
# https://docs.konghq.com/kubernetes-ingress-controller/latest/deployment/eks/
resource "helm_release" "konghq-external" {
name = "${module.generator.prefix}-kong-external"
repository = "https://charts.konghq.com"
chart = "kong"
namespace = kubernetes_namespace_v1.kong.metadata[0].name
version = "2.13.0"
values = [templatefile("${path.module}/configs/konghq/values.tftpl", {
name = "${module.generator.prefix}-kong-external",
crt_arn = aws_acm_certificate.external_lb.arn,
additional_ports = [1235, 1236, 1237],
plugins = [
{
name = "http-mirror",
cm_name = kubernetes_config_map.kong_plugin-http_mirror.metadata[0].name
},
{
name = "external-auth",
cm_name = kubernetes_config_map.kong_plugin-external_auth.metadata[0].name
}
]
})]
set {
name = "ingressController.image.tag"
value = "2.8"
}
set {
name = "replicaCount"
value = local.kong_external_replicas
}
set {
name = "ingressController.ingressClass"
value = "kong-external-lb"
}
}
resource "helm_release" "konghq-chainstack" {
count = local.is_prod_envs
name = "${module.generator.prefix}-chainstack"
repository = "https://charts.konghq.com"
chart = "kong"
namespace = kubernetes_namespace_v1.kong.metadata[0].name
version = "2.13.0"
values = [templatefile("${path.module}/configs/konghq/values.tftpl", {
name = "${module.generator.prefix}-chainstack",
crt_arn = aws_acm_certificate.external_lb.arn,
additional_ports = [],
plugins = []
})]
set {
name = "ingressController.image.tag"
value = "2.8"
}
set {
name = "replicaCount"
value = 1
}
set {
name = "ingressController.ingressClass"
value = "kong-chainstack-lb"
}
}