-
Notifications
You must be signed in to change notification settings - Fork 2
/
k8s.tf
111 lines (91 loc) · 5.76 KB
/
k8s.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
# These manifests have been taken from https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
resource "kubernetes_manifest" "otel-cert-operator-serving" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-cert-operator-serving.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-clusterrolebinding-operator-manager" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-clusterrolebinding-operator-manager.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-clusterrolebinding-operator-proxy" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-clusterrolebinding-operator-proxy.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-clusterrole-operator-manager" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-clusterrole-operator-manager.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-clusterrole-operator-metrics-reader" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-clusterrole-operator-metrics-reader.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-clusterrole-operator-proxy" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-clusterrole-operator-proxy.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-crd-collectors" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-crd-collectors.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-crd-instrumentations" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-crd-instrumentations.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-deployment-operator-controller-manager" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-deployment-operator-controller-manager.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-issuer-operator-selfsigned" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-issuer-operator-selfsigned.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-ns-operator-system" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-ns-operator-system.yaml"))
depends_on = [helm_release.cert_manager]
}
resource "kubernetes_manifest" "otel-rolebinding-operator-leader-election" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-rolebinding-operator-leader-election.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-role-operator-system" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-role-operator-system.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-sa-operator-controller-manager" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-sa-operator-controller-manager.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-svc-operator-controller-manager" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-svc-operator-controller-manager.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-svc-operator-webhook" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-svc-operator-webhook.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-webhookconfig" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-webhookconfig.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}
resource "kubernetes_manifest" "otel-webhookvalidation" {
count = var.k8s_opentelemetry_enabled ? 1 : 0
manifest = yamldecode(file("${path.module}/k8s-manifests/otel-webhookvalidation.yaml"))
depends_on = [helm_release.cert_manager, kubernetes_manifest.otel-ns-operator-system]
}