Skip to content

Commit

Permalink
enhance ServiceMonitor (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamyeka authored Jul 19, 2023
1 parent be44c3f commit 039b300
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/horizon/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A CICD DevOps Platform

type: application

version: 2.2.6
version: 2.2.7
appVersion: v2.4.2
dependencies:
- name: common
Expand Down
17 changes: 13 additions & 4 deletions charts/horizon/templates/core/core-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.core.monitor.enabled }}
{{- if .Values.core.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand All @@ -8,9 +8,18 @@ metadata:
component: core
spec:
endpoints:
- interval: 30s
path: /metrics
port: http
- port: http
path: {{ .Values.core.serviceMonitor.path }}
{{- with .Values.core.serviceMonitor.interval }}
interval: {{ . }}
{{- end }}
{{- with .Values.core.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- if .Values.core.serviceMonitor.relabelings }}
relabelings:
{{- toYaml .Values.core.serviceMonitor.relabelings | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{ include "horizon.labels" . | indent 6 }}
Expand Down
9 changes: 7 additions & 2 deletions charts/horizon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ core:
additionalLabels: {}
image:
repository: horizoncd/horizon-core
tag:
tag:
args:
loglevel:
securityContext:
Expand All @@ -142,8 +142,13 @@ core:
envs: {}
extraVolumeMounts: []
extraVolumes: []
monitor:
serviceMonitor:
enabled: false
path: /metrics
interval: 1m
scrapeTimeout: 30s
relabelings: []

grafanaDashboards:
- name: pod
value: |
Expand Down

0 comments on commit 039b300

Please sign in to comment.