-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
119 lines (111 loc) · 2.87 KB
/
variables.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
109
110
111
112
113
114
115
116
117
118
119
variable "k8s_labels" {
type = map(string)
description = "Labels to apply to all Kubernetes objects"
default = {}
}
variable "bitbucket_runners" {
type = map(object({
runner_resources = optional(object({
limits = optional(object({
cpu = optional(string)
memory = optional(string)
}))
requests = optional(object({
cpu = optional(string)
memory = optional(string)
}))
}))
dind_resources = optional(object({
limits = optional(object({
cpu = optional(string)
memory = optional(string)
}))
requests = optional(object({
cpu = optional(string)
memory = optional(string)
}))
}))
cron_scaling_enabled = optional(bool, false)
triggers = optional(list(object({
start = string
end = string
timezone = string
desiredReplicas = number
})), [])
}))
description = "Map of Bitbucket runner definitions"
}
variable "runner_version" {
type = number
description = "Version of the Bitbucket runner to deploy"
default = 1
}
variable "k8s_namespace" {
type = string
description = "Kubernetes namespace where to deploy the runners to"
}
variable "k8s_node_selector" {
type = map(string)
description = "Node selector to apply to the runner StatefulSets"
default = null
}
variable "k8s_tolerations" {
type = list(object({
effect = string
key = string
value = string
}))
description = "Tolerations to apply to the runner StatefulSets"
default = []
}
variable "k8s_service_account_annotations" {
type = map(string)
description = "Annotations to attach to the ServiceAccount"
default = {}
}
variable "bitbucket_runner_container_default_resources" {
type = object({
limits = optional(object({
cpu = optional(string)
memory = optional(string)
}))
requests = optional(object({
cpu = optional(string)
memory = optional(string)
}))
})
description = "Default resources that will be applied to the Bitbucket runner container of all runner Pods, unless overriden in the runner definition"
default = {
limits = {
cpu = null
memory = "4G"
}
requests = {
cpu = 1
memory = "1G"
}
}
}
variable "dind_container_default_resources" {
type = object({
limits = optional(object({
cpu = optional(string)
memory = optional(string)
}))
requests = optional(object({
cpu = optional(string)
memory = optional(string)
}))
})
description = "Default resources that will be applied to the DinD container of all runner Pods, unless overriden in the runner definition"
default = {
limits = {
cpu = null
memory = "4G"
}
requests = {
cpu = 1
memory = "1G"
}
}
}