Skip to content

Commit

Permalink
feat: add servicemonitors for bulker, ingest and rotor
Browse files Browse the repository at this point in the history
  • Loading branch information
echozio committed May 14, 2024
1 parent b4c32f1 commit 08c7ace
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 3 deletions.
1 change: 1 addition & 0 deletions templates/bulker/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: {{ include "jitsu.fullname" . }}-bulker
labels:
{{- include "jitsu.labels" . | nindent 4 }}
{{- include "jitsu.bulker.selectorLabels" . | nindent 4 }}
spec:
type: {{ .Values.bulker.service.type }}
ports:
Expand Down
35 changes: 35 additions & 0 deletions templates/bulker/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if .Values.bulker.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "jitsu.fullname" . }}-bulker
labels:
{{- include "jitsu.labels" . | nindent 4 }}
{{- include "jitsu.bulker.selectorLabels" . | nindent 4 }}
{{- with .Values.bulker.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceMonitors.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- path: /metrics
port: metrics
scheme: http
interval: {{ .Values.bulker.serviceMonitor.interval | default .Values.serviceMonitors.interval }}
relabelings:
{{- with .Values.bulker.serviceMonitor.relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.serviceMonitors.relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "jitsu.selectorLabels" . | nindent 6 }}
{{- include "jitsu.bulker.selectorLabels" . | nindent 6 }}
{{- end -}}
1 change: 1 addition & 0 deletions templates/ingest/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: {{ include "jitsu.fullname" . }}-ingest
labels:
{{- include "jitsu.labels" . | nindent 4 }}
{{- include "jitsu.ingest.selectorLabels" . | nindent 4 }}
spec:
type: {{ .Values.ingest.service.type }}
ports:
Expand Down
35 changes: 35 additions & 0 deletions templates/ingest/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if .Values.ingest.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "jitsu.fullname" . }}-ingest
labels:
{{- include "jitsu.labels" . | nindent 4 }}
{{- include "jitsu.ingest.selectorLabels" . | nindent 4 }}
{{- with .Values.ingest.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceMonitors.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- path: /metrics
port: metrics
scheme: http
interval: {{ .Values.ingest.serviceMonitor.interval | default .Values.serviceMonitors.interval }}
relabelings:
{{- with .Values.ingest.serviceMonitor.relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.serviceMonitors.relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "jitsu.selectorLabels" . | nindent 6 }}
{{- include "jitsu.ingest.selectorLabels" . | nindent 6 }}
{{- end -}}
1 change: 1 addition & 0 deletions templates/rotor/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: {{ include "jitsu.fullname" . }}-rotor
labels:
{{- include "jitsu.labels" . | nindent 4 }}
{{- include "jitsu.rotor.selectorLabels" . | nindent 4 }}
spec:
type: {{ .Values.rotor.service.type }}
ports:
Expand Down
35 changes: 35 additions & 0 deletions templates/rotor/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if .Values.rotor.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "jitsu.fullname" . }}-rotor
labels:
{{- include "jitsu.labels" . | nindent 4 }}
{{- include "jitsu.rotor.selectorLabels" . | nindent 4 }}
{{- with .Values.rotor.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceMonitors.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- path: /metrics
port: metrics
scheme: http
interval: {{ .Values.rotor.serviceMonitor.interval | default .Values.serviceMonitors.interval }}
relabelings:
{{- with .Values.rotor.serviceMonitor.relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.serviceMonitors.relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "jitsu.selectorLabels" . | nindent 6 }}
{{- include "jitsu.rotor.selectorLabels" . | nindent 6 }}
{{- end -}}
38 changes: 35 additions & 3 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,15 @@ bulker:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:
topologySpreadConstraints: ~
serviceMonitor:
enabled: false
labels: {}
interval: ~
relabelings:
- action: replace
targetLabel: service
replacement: bulker

rotor:
enabled: true
Expand Down Expand Up @@ -557,7 +565,15 @@ rotor:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:
topologySpreadConstraints: ~
serviceMonitor:
enabled: false
labels: {}
interval: ~
relabelings:
- action: replace
targetLabel: service
replacement: rotor

ingest:
enabled: true
Expand Down Expand Up @@ -686,7 +702,15 @@ ingest:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:
topologySpreadConstraints: ~
serviceMonitor:
enabled: false
labels: {}
interval: ~
relabelings:
- action: replace
targetLabel: service
replacement: ingest

syncctl:
enabled: true
Expand Down Expand Up @@ -827,6 +851,14 @@ serviceAccount:
rbac:
create: true

serviceMonitors:
interval: 60s
labels: {}
relabelings:
- action: replace
targetLabel: job
replacement: jitsu

postgresql:
enabled: true
auth:
Expand Down

0 comments on commit 08c7ace

Please sign in to comment.