This repository was archived by the owner on Feb 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
99 lines (80 loc) · 2.77 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
resource "kubernetes_deployment" "tiller" {
metadata {
name = "tiller-deploy"
namespace = "${var.tiller_namespace}"
labels = {
app = "helm"
name = "tiller"
}
}
spec {
replicas = "${var.tiller_replicas}"
selector {
match_labels = {
app = "helm"
name = "tiller"
}
}
template {
metadata {
labels = {
app = "helm"
name = "tiller"
}
}
spec {
container {
name = "tiller"
image = "${var.tiller_image}:${var.tiller_version}"
image_pull_policy = "IfNotPresent"
port {
name = "tiller"
container_port = 44134
}
port {
name = "http"
container_port = 44135
}
env {
name = "TILLER_NAMESPACE"
value = "${var.tiller_namespace}"
}
env {
name = "TILLER_HISTORY"
value = "${var.tiller_history}"
}
liveness_probe {
http_get {
path = "/liveness"
port = 44135
}
initial_delay_seconds = 1
timeout_seconds = 1
}
readiness_probe {
http_get {
path = "/readiness"
port = 44135
}
initial_delay_seconds = 1
timeout_seconds = 1
}
# https://github.com/terraform-providers/terraform-provider-kubernetes/issues/38#issuecomment-318581203
volume_mount {
mount_path = "/var/run/secrets/kubernetes.io/serviceaccount"
name = "${kubernetes_service_account.tiller.default_secret_name}"
read_only = true
}
}
volume {
name = "${kubernetes_service_account.tiller.default_secret_name}"
secret {
secret_name = "${kubernetes_service_account.tiller.default_secret_name}"
}
}
host_network = "${var.tiller_net_host}"
node_selector = "${var.tiller_node_selector}"
}
}
}
}