-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment.tf
46 lines (46 loc) · 1.04 KB
/
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
resource "kubernetes_deployment" "hazelcast" {
metadata {
name = var.name
labels = var.labels
}
spec {
replicas = var.cluster_members
selector {
match_labels = {
name = var.name
}
}
template {
metadata {
labels = merge(var.labels, { name = var.name })
}
spec {
container {
name = var.name
image = "hazelcast/hazelcast:${var.hazelcast_version}"
resources {
requests {
cpu = var.cpu
memory = var.memory
}
}
env {
name = "JAVA_OPTS"
value = "-Dhazelcast.config=/opt/hazelcast/config_ext/hazelcast.yaml"
}
volume_mount {
name = "hazelcast-config"
mount_path = "/opt/hazelcast/config_ext/"
}
}
automount_service_account_token = true
volume {
name = "hazelcast-config"
config_map {
name = var.name
}
}
}
}
}
}