Skip to content

Commit

Permalink
feat: add service monitor for mission-control
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed May 21, 2024
1 parent 9b5963b commit 2697b7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions chart/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ spec:
- port: 8080
targetPort: 8080
protocol: TCP
name: http
selector:
{{- include "incident-commander.selectorLabels" . | nindent 4 }}
16 changes: 16 additions & 0 deletions chart/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if (lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" "servicemonitors.monitoring.coreos.com") }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "incident-commander.name" . }}-monitor
labels:
{{- include "incident-commander.labels" . | nindent 4 }}
spec:
jobLabel: {{ include "incident-commander.name" . }}
endpoints:
- port: http
interval: 30s
selector:
matchLabels:
{{- include "incident-commander.labels" . | nindent 6 }}
{{- end }}

0 comments on commit 2697b7d

Please sign in to comment.