-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
45 lines (39 loc) · 1.24 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
provider "kubernetes" {
version = "~> 1.8.0"
load_config_file = true
}
locals {
app_name = "jenkins"
app_version = "1.0.0"
}
resource "kubernetes_namespace" "jenkins" {
metadata {
name = "${local.app_name}-${var.env_name}"
labels {
"app.k8s.io/name" = "${local.app_name}"
"app.k8s.io/instance" = "${var.env_name}"
"app.k8s.io/version" = "${local.app_version}"
"app.k8s.io/component" = "agent"
"app.k8s.io/part-of" = "jenkins"
"app.k8s.io/managed-by" = "terraform"
}
}
}
module "agent" {
source = "git::https://github.com/lsst-sqre/deploy-jenkins.git//tf/modules/agent-ldfc"
name = "agent-ldfc"
k8s_namespace = "${kubernetes_namespace.jenkins.metadata.0.name}"
agent_storage_class = ""
agent_volume_size = "1500"
agent_user = "${var.agent_user}"
agent_pass = "${var.agent_pass}"
master_url = "${var.master_url}"
agent_replicas = "6"
agent_labels = ["docker", "ldfc"]
agent_executors = "1"
env_name = "${var.env_name}"
swarm_image = "lsstsqre/jenkins-swarm-client:3.15-ldfc"
agent_uid = "48435"
agent_gid = "202"
node_blacklist = ["bogus"]
}