Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
axosyslog-collector: add optional PodMonitor CR
Browse files Browse the repository at this point in the history
  • Loading branch information
orymate committed Aug 10, 2023
1 parent e546885 commit 8cb2704
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions charts/axosyslog-collector/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ template "axosyslog-collector.fullname" . }}
namespace: {{ include "axosyslog-collector.namespace" . }}
labels:
app: "{{ template "axosyslog-collector.fullname" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
{{- with .Values.podMonitor.labels }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- with .Values.podMonitor.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
selector:
matchLabels:
app: "{{ template "axosyslog-collector.fullname" . }}"
release: {{ .Release.Name | quote }}
podMetricsEndpoints:
- port: exporter
{{- end }}
5 changes: 5 additions & 0 deletions charts/axosyslog-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ metricsExporter:
resources: {}
securityContext: {}

podMonitor:
enabled: false # deploy the PodMonitor CR for Prometheus Operator (requires metricsExporter.enabled)
labels: {}
annotations: {}

config:
raw: "" # Use this to manually set the contents of the syslog-ng.conf file.
version: ""
Expand Down

0 comments on commit 8cb2704

Please sign in to comment.