Skip to content

Commit

Permalink
chore(module): remove virtualization-contoller metrics duplicates (#289)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Tishkov <[email protected]>
  • Loading branch information
fl64 authored Aug 14, 2024
1 parent af7dd97 commit 923ea0a
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 38 deletions.
33 changes: 33 additions & 0 deletions templates/virtualization-controller/scrape-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
apiVersion: monitoring.coreos.com/v1alpha1
kind: ScrapeConfig
metadata:
name: virtualization-controller
namespace: d8-monitoring
{{- include "helm_lib_module_labels" (list . (dict "app" "virtualization-controller" "prometheus" "main")) | nindent 2 }}
spec:
honorLabels: true
authorization:
credentials:
key: token
name: prometheus-token
scheme: HTTP
tlsConfig:
insecureSkipVerify: true
staticConfigs:
- targets: ['virtualization-controller-metrics.d8-{{ .Chart.Name }}.svc.{{ .Values.global.discovery.clusterDomain }}.:8080']
relabelings:
- action: labeldrop
regex: (container|endpoint|job|service|pod|exported_namespace|uid)
metricRelabelings:
- sourceLabels: [__name__]
regex: "(.*)"
separator: ;
action: replace
targetLabel: __name__
replacement: d8_$1
- action: replace
sourceLabels:
- exported_namespace
targetLabel: namespace
metricsPath: '/metrics'
17 changes: 17 additions & 0 deletions templates/virtualization-controller/service-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: v1
kind: Service
metadata:
name: virtualization-controller-metrics
namespace: d8-{{ .Chart.Name }}
{{- include "helm_lib_module_labels" (list . (dict "app" "virtualization-controller")) | nindent 2 }}
spec:
ports:
- type: ClusterIP
clusterIP: None
name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app: virtualization-controller
34 changes: 0 additions & 34 deletions templates/virtualization-controller/service-monitor.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions templates/virtualization-controller/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ spec:
port: 9443
targetPort: controller
protocol: TCP
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
- name: pprof
port: 8081
protocol: TCP
Expand Down

0 comments on commit 923ea0a

Please sign in to comment.