-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment_clusters.tf
115 lines (97 loc) · 3.1 KB
/
deployment_clusters.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
resource "helm_release" "nginx_ingress" {
name = "ingress-nginx"
repository = "https://kubernetes.github.io/ingress-nginx"
chart = "ingress-nginx"
namespace = "ingress-nginx"
version = "4.6.0"
set {
name = "controller.extraArgs.enable-ssl-passthrough"
value = ""
}
}
resource "helm_release" "target_vcluster_prod" {
name = "target-vcluster-prod"
namespace = "target-vcluster-prod"
create_namespace = true
repository = "https://charts.loft.sh"
chart = "vcluster"
version = "0.11.2"
values = [
file("${path.module}/manifests/deployment_clusters/vcluster-prod-values.yml")
]
}
resource "helm_release" "target_vcluster_staging" {
name = "target-vcluster-staging"
namespace = "target-vcluster-staging"
create_namespace = true
repository = "https://charts.loft.sh"
chart = "vcluster"
version = "0.11.2"
values = [
file("${path.module}/manifests/deployment_clusters/vcluster-staging-values.yml")
]
}
resource "helm_release" "target_vcluster_qa" {
name = "target-vcluster-qa"
namespace = "target-vcluster-qa"
create_namespace = true
repository = "https://charts.loft.sh"
chart = "vcluster"
version = "0.11.2"
values = [
file("${path.module}/manifests/deployment_clusters/vcluster-qa-values.yml")
]
}
resource "helm_release" "target_vcluster_dev" {
name = "target-vcluster-dev"
namespace = "target-vcluster-dev"
create_namespace = true
repository = "https://charts.loft.sh"
chart = "vcluster"
version = "0.11.2"
values = [
file("${path.module}/manifests/deployment_clusters/vcluster-dev-values.yml")
]
}
resource "kubernetes_manifest" "prod_ingress" {
depends_on = [
helm_release.target_vcluster_prod
]
manifest = yamldecode(file("manifests/ingresses/vcluster-prod-ing.yml"))
}
resource "kubernetes_manifest" "staging_ingress" {
depends_on = [
helm_release.target_vcluster_staging
]
manifest = yamldecode(file("manifests/ingresses/vcluster-staging-ing.yml"))
}
resource "kubernetes_manifest" "qa_ingress" {
depends_on = [
helm_release.target_vcluster_qa
]
manifest = yamldecode(file("manifests/ingresses/vcluster-qa-ing.yml"))
}
resource "kubernetes_manifest" "dev_ingress" {
depends_on = [
helm_release.target_vcluster_dev
]
manifest = yamldecode(file("manifests/ingresses/vcluster-dev-ing.yml"))
}
# Create Cluster for Crossplane
resource "helm_release" "target_vcluster_crossplane" {
name = "target-vcluster-crossplane"
namespace = "target-vcluster-crossplane"
create_namespace = true
repository = "https://charts.loft.sh"
chart = "vcluster"
version = "0.11.2"
values = [
file("${path.module}/manifests/deployment_clusters/vcluster-crossplane-values.yml")
]
}
resource "kubernetes_manifest" "crossplane_ingress" {
depends_on = [
helm_release.target_vcluster_crossplane
]
manifest = yamldecode(file("manifests/ingresses/vcluster-crossplane-ing.yml"))
}