fix
This commit is contained in:
34
apps/sonar/sonar_monitoring.tf
Normal file
34
apps/sonar/sonar_monitoring.tf
Normal file
@@ -0,0 +1,34 @@
|
||||
resource "kubectl_manifest" "PodMonitor_sonarqube" {
|
||||
count = var.conditions.have_podmonitors?1:0
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: sonarqube
|
||||
namespace: ${var.namespace}
|
||||
labels: ${jsonencode(local.sonar_all_labels)}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- ${var.namespace}
|
||||
selector:
|
||||
matchLabels: ${jsonencode(local.sonar_labels)}
|
||||
podMetricsEndpoints:
|
||||
- port: http
|
||||
path: /api/monitoring/metrics
|
||||
scheme: http
|
||||
interval: 30s
|
||||
bearerTokenSecret:
|
||||
name: ${kubectl_manifest.secret.name}
|
||||
key: SONAR_WEB_SYSTEMPASSCODE
|
||||
- port: monitoring-ce
|
||||
path: /
|
||||
scheme: http
|
||||
interval: 30s
|
||||
- port: monitoring-web
|
||||
path: /
|
||||
scheme: http
|
||||
interval: 30s
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user