main.tf
1.56 KB
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
module "deploy" {
source = "../"
name = var.app_name
namespace = var.app_namespace
image = var.image
internal_port = var.ports
volume_nfs = [
{
path_on_nfs = "/"
nfs_endpoint = "10.10.0.100"
volume_name = var.volume_data
}
]
volume_host_path = [
{
volume_name = var.volume_logs
path_on_node = "/var/log"
},
{
volume_name = var.volume_tmp
path_on_node = "/tmp"
}
]
volume_mount = [
{
mount_path = "/var/jenkins_home"
sub_path = "jenkins"
volume_name = var.volume_data
},
{
mount_path = "/logs"
volume_name = var.volume_logs
},
{
mount_path = "/tmps"
volume_name = var.volume_tmp
},
{
mount_path = "/var/jenkins_home/config.conf"
volume_name = var.volume_config
sub_path = "key1" // Key from configmap
}
]
volume_config_map = [
{
mode = "0777" // Must be a value between 0 and 0777. Defaults to 0644
name = "config-jenkins" // Config map name
volume_name = var.volume_config
}
]
readiness_probe = {
http_get = {
path = "/healthcheck"
port = 80
scheme = "HTTP"
http_header = [
{
name = "test"
value = "test"
},
{
name = "tes"
value = "asd"
}
]
}
success_threshold = 1
failure_threshold = 3
initial_delay_seconds = 10
period_seconds = 30
timeout_seconds = 3
}
}