Skip to content

Commit

Permalink
Merge pull request #102 from evilrussian/master
Browse files Browse the repository at this point in the history
feature: defining of priorityClassName and add ServiceMonitor in helm chart
  • Loading branch information
gautam2187 authored May 13, 2020
2 parents 6ba67ba + 85b7229 commit eb86597
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions log-router/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
- name: {{ .Values.image.pullSecret }}
{{- end }}
serviceAccountName: {{ if .Values.rbac.create }}{{ template "fluentd-router.fullname" . }}{{ else }}"{{ .Values.serviceAccountName }}"{{ end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
containers:
- name: fluentd
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
22 changes: 22 additions & 0 deletions log-router/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "fluentd-router.fullname" . }}
labels:
app: {{ template "fluentd-router.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
jobLabel: app
selector:
matchLabels:
app: {{ template "fluentd-router.name" . }}
release: {{ .Release.Name }}
endpoints:
- port: prometheus
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions log-router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ tolerations: []
# cpu: 100m
# memory: 128Mi

priorityClassName: ""

updateStrategy: {}
# type: RollingUpdate

Expand All @@ -84,4 +86,14 @@ updateStrategy: {}

prometheusEnabled: false

serviceMonitor:
# enable support for Prometheus Operator
enabled: false

# Job label for scrape target
jobLabel: app

# Scrape interval. If not set, the Prometheus default scrape interval is used.
interval: ""

allowTagExpansion: false

0 comments on commit eb86597

Please sign in to comment.