Skip to content

Commit

Permalink
Ensured the service monitor was behind a toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Stono committed Jul 14, 2020
1 parent 293f7ff commit e51a89b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion helmfile/charts/kconmon/templates/agent/service.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{ if .Values.prometheus.enableServiceMonitor }}
apiVersion: v1
kind: Service
metadata:
labels:
{{ include "kconmon.app.labels.standard" . | indent 4 }}
app: kconmon
component: agent
name: agent
spec:
Expand All @@ -17,3 +17,4 @@ spec:
component: agent
sessionAffinity: None
type: ClusterIP
{{ end }}
4 changes: 3 additions & 1 deletion helmfile/charts/kconmon/templates/agent/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{ if .Values.prometheus.enableServiceMonitor }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: kconmon
{{ include "kconmon.app.labels.standard" . | indent 4 }}
name: kconmon-service-monitor
namespace: kconmon
spec:
Expand All @@ -16,3 +17,4 @@ spec:
matchLabels:
app: kconmon
component: agent
{{ end }}
4 changes: 4 additions & 0 deletions helmfile/charts/kconmon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ resources:
# The minimum value is 25m
cpu: 70m
memory: 45Mi

prometheus:
# If you wish to create a service and a service monitor because you're using the prometheus operator, change this to true
enableServiceMonitor: false

0 comments on commit e51a89b

Please sign in to comment.