Skip to content

Commit

Permalink
Add servicemonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrizic committed May 5, 2022
1 parent 382ec3d commit bfa8919
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/formserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.3
version: 1.0.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
19 changes: 19 additions & 0 deletions charts/formserver/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.monitoring.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "formserver.fullname" . }}
labels:
release: monitoring
spec:
endpoints:
- interval: 10s
path: /metrics/
port: http
namespaceSelector:
matchNames:
- {{ include "formserver.fullname" . }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "formserver.fullname" . }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/formserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ database:
name: "secret"
key: "secretKey"

monitoring:
serviceMonitor:
enabled: false

storage:
afsdata:
size: 10Gi
Expand Down

0 comments on commit bfa8919

Please sign in to comment.