Skip to content

Commit

Permalink
added servicemonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
arichtman committed Dec 13, 2023
1 parent 5172479 commit 4c4e1c4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
data:
# TODO: work out how to pass through the yaml
data-prepper-config.yaml: 'ssl: false'
data-prepper-config.yaml: |
{{- toYaml .Values.dataPrepperConfig | nindent 6 }}
kind: ConfigMap
metadata:
name: {{ include "data-prepper.configName" . }}
Expand Down
17 changes: 17 additions & 0 deletions examples/helm-chart/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "data-prepper.fullname" . }}
labels:
{{- include "data-prepper.labels" . | nindent 4 }}
{{- range $key, $value := .Values.serviceMonitor.extraLabels }}
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
{{- end }}
spec:
selector:
{{- include "data-prepper.selectorLabels" . | nindent 4 }}
endpoints:
{{- toYaml .Values.serviceMonitor.metricsEndpoints | nindent 2 }}
{{- end }}

24 changes: 12 additions & 12 deletions examples/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,29 @@ podAnnotations: {}
podLabels: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP

dataPrepperConfig: {}
pipelineConfig: {}

serviceMonitor:
enabled: false
extraLabels: {}
metricsEndpoints:
- port: server
path: /metrics/sys
- port: server
path: /metrics/prometheus

ports:
- name: http
port: 2021
- name: server
port: 4900
- name: otel-traces
port: 21890
- name: otel-metrics
Expand All @@ -54,17 +59,12 @@ ingress:
enabled: false
className: ''
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down

0 comments on commit 4c4e1c4

Please sign in to comment.