forked from quay/quay-performance-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitoring_lb_service.tf
More file actions
44 lines (41 loc) · 928 Bytes
/
monitoring_lb_service.tf
File metadata and controls
44 lines (41 loc) · 928 Bytes
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
resource "kubernetes_service" "prometheus_lb_service" {
count = var.enable_monitoring ? 1 : 0
metadata {
name = "${var.prefix}-prometheus-lb"
namespace = "${kubernetes_namespace.quay_ns.metadata[0].name}"
}
spec {
selector = {
"app" = "prometheus-app"
}
port {
name = "prometheus"
port = 9090
target_port = 9090
}
type = "LoadBalancer"
}
}
resource "kubernetes_service" "grafana_lb_service" {
count = var.enable_monitoring ? 1 : 0
metadata {
name = "${var.prefix}-grafana-lb"
namespace = "${kubernetes_namespace.quay_ns.metadata[0].name}"
}
spec {
selector = {
"app" = "grafana-app"
}
port {
name = "grafana-http"
port = 80
target_port = 3000
}
port {
name = "grafana-https"
port = 443
target_port = 3000
}
type = "LoadBalancer"
}
}