-
Notifications
You must be signed in to change notification settings - Fork 0
/
etcd_deployment.tf
70 lines (68 loc) · 1.57 KB
/
etcd_deployment.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
resource "kubernetes_deployment" "etcd" {
metadata {
name = "etcd"
labels {
app = "etcd"
suite = "pachyderm"
}
}
spec {
replicas = "${var.etcd_replicas}"
selector {
app = "etcd"
suite = "pachyderm"
}
template {
metadata {
labels {
app = "etcd"
suite = "pachyderm"
}
}
spec {
container {
name = "etcd"
image = "${var.etcd_image_repo}:${var.etcd_image_tag}"
image_pull_policy = "${var.etcd_image_pull_policy}"
port = [
{
name = "client-port"
container_port = 2379
},
{
name = "peer-port"
container_port = 2380
}
]
resources {
limits {
cpu = "${var.etcd_cpu_max}"
memory = "${var.etcd_memory_max}"
}
requests {
cpu = "${var.etcd_cpu}"
memory = "${var.etcd_memory}"
}
}
command = [
"/usr/local/bin/etcd",
"--listen-client-urls=http://0.0.0.0:2379",
"--advertise-client-urls=http://0.0.0.0:2379",
"--data-dir=/var/data/etcd",
"--auto-compaction-retention=1"
]
volume_mount {
name = "etcd-storage"
mount_path = "/var/data/etcd"
}
}
volume {
name = "etcd-storage"
host_path {
path = "/var/pachyderm/etcd"
}
}
}
}
}
}