generated from openziti-test-kitchen/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
108 lines (105 loc) · 3.26 KB
/
main.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
resource "helm_release" "ziti_controller" {
count = var.install == true ? 1 : 0 # install unless false
namespace = var.ziti_namespace
create_namespace = var.create_namespace
name = var.ziti_controller_release
version = var.chart_version
repository = var.chart_repo
chart = var.ziti_charts != "" ? "${var.ziti_charts}/ziti-controller" : "ziti-controller"
wait = var.helm_release_wait
wait_for_jobs = var.helm_release_wait_for_jobs
timeout = var.helm_release_timeout
values = [yamlencode(merge({
image = {
repository = var.image_repo
tag = var.image_tag
}
clientApi = {
advertisedHost = "${var.client_domain_name}.${var.dns_zone}"
advertisedPort = 443
ingress = {
enabled = true
ingressClassName = var.ingress_class
annotations = var.ingress_annotations
}
service = {
enabled = true
type = "ClusterIP"
}
}
ctrlPlane = {
advertisedHost = "${var.ctrl_domain_name}.${var.dns_zone}"
advertisedPort = 443
ingress = {
enabled = true
ingressClassName = var.ingress_class
annotations = var.ingress_annotations
}
service = {
enabled = true
type = "ClusterIP"
}
}
edgeSignerPki = {
enabled = true
}
webBindingPki = {
enabled = true
}
managementApi = {
advertisedHost = "${var.mgmt_domain_name}.${var.dns_zone}"
advertisedPort = 443
dnsNames = [var.mgmt_dns_san]
ingress = {
enabled = var.mgmt_ingress_enabled
ingressClassName = var.ingress_class
annotations = var.ingress_annotations
}
service = {
enabled = true
type = "ClusterIP"
}
}
prometheus = {
service = {
enabled = var.prometheus_enabled
type = "ClusterIP"
}
}
persistence = {
storageClass = var.storage_class != "-" ? var.storage_class : ""
}
cert-manager = {
enabled = false
}
trust-manager = {
enabled = false
}
ingress-nginx = {
enabled = false
}
},
var.values
))]
}
data "kubernetes_secret" "admin_password_secret" {
depends_on = [helm_release.ziti_controller]
metadata {
name = "${var.ziti_controller_release}-admin-secret"
namespace = var.ziti_namespace
}
}
data "kubernetes_secret" "admin_client_cert_secret" {
depends_on = [helm_release.ziti_controller]
metadata {
name = "${var.ziti_controller_release}-admin-client-secret"
namespace = var.ziti_namespace
}
}
data "kubernetes_config_map" "ctrl_trust_bundle" {
depends_on = [helm_release.ziti_controller]
metadata {
name = "${var.ziti_controller_release}-ctrl-plane-cas"
namespace = var.ziti_namespace
}
}