-
Notifications
You must be signed in to change notification settings - Fork 1
/
metrics.tf
49 lines (42 loc) · 895 Bytes
/
metrics.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
# Create Metrics Controller Service
resource "kubernetes_service" "hcloud_csi_controller_metrics" {
count = var.kube_version < 1.16 ? 0 : 1
metadata {
name = "hcloud-csi-controller-metrics"
namespace = "kube-system"
labels = {
app = "hcloud-csi"
}
}
spec {
selector = {
app = "hcloud-csi-controller"
}
port {
name = "metrics"
port = 9189
target_port = "metrics"
}
}
}
# Create Metrics Node Service
resource "kubernetes_service" "hcloud_csi_node_metrics" {
count = var.kube_version < 1.16 ? 0 : 1
metadata {
name = "hcloud-csi-node-metrics"
namespace = "kube-system"
labels = {
app = "hcloud-csi"
}
}
spec {
selector = {
app = "hcloud-csi"
}
port {
name = "metrics"
port = 9189
target_port = "metrics"
}
}
}