forked from DeimosCloud/terraform-kubernetes-gitlab-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
51 lines (44 loc) · 1.58 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
//INSTALL HELM CHART
resource "helm_release" "gitlab_runner" {
name = var.release_name
repository = local.repository
chart = local.chart_name
namespace = var.namespace
version = var.chart_version
create_namespace = var.create_namespace
atomic = var.atomic
values = [
yamlencode({
image = var.runner_image
gitlabUrl = var.gitlab_url
concurrent = var.concurrent
runnerRegistrationToken = var.runner_registration_token
runnerToken = local.runner_token
replicas = local.replicas
unregisterRunners = var.unregister_runners
secrets = var.additional_secrets
runners = {
name = var.runner_name
runUntagged = var.run_untagged_jobs
tags = var.runner_tags
locked = var.runner_locked
config = local.config
cache = {
secretName = local.cache_secret_name
}
}
rbac = {
create = var.create_service_account
serviceAccountAnnotations = var.service_account_annotations
serviceAccountName = var.service_account
clusterWideAccess = var.service_account_clusterwide_access
}
nodeSelector = var.manager_node_selectors
tolerations = var.manager_node_tolerations
podLabels = var.manager_pod_labels
podAnnotations = var.manager_pod_annotations
}),
yamlencode(var.values),
local.values_file
]
}