Skip to content

Commit

Permalink
Merge pull request #143 from shoplineapp/feature/PLAT-642-argo-event-…
Browse files Browse the repository at this point in the history
…visualise-metrics

[platform][PLAT-642] Update Argo-event to support PodMonitor
  • Loading branch information
neal-sl authored Feb 28, 2024
2 parents c6e0eaa + abdc054 commit 55552af
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 2 deletions.
2 changes: 1 addition & 1 deletion argo-event/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: argo-event
description: A Helm chart for deploying argo event
type: application
version: 0.0.1
version: 0.0.2
29 changes: 29 additions & 0 deletions argo-event/templates/eventbus_podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if .Values.podMonitor.eventbus.enable }}
# Used for Promotheous
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Values.name }}-eventbus
labels:
release: prometheus-operator
{{- with .Values.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.podMonitor.eventbus.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
spec:
namespaceSelector:
matchNames:
{{- if .Values.podMonitor.eventbus.namespace -}}
{{ toYaml .Values.podMonitor.eventbus.namespace | nindent 6 }}
{{- else }}
- {{ .Release.Namespace }}
{{- end }}
podMetricsEndpoints:
- port: metrics
selector:
matchLabels:
owner-name: {{ .Values.name }}
app: {{ .Values.name }}-eventbus
{{ end }}
29 changes: 29 additions & 0 deletions argo-event/templates/eventsource_podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if .Values.podMonitor.eventsource.enable }}
# Used for Promotheous
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Values.name }}-eventsource
labels:
release: prometheus-operator
{{- with .Values.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.podMonitor.eventsource.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
spec:
namespaceSelector:
matchNames:
{{- if .Values.podMonitor.eventsource.namespace -}}
{{ toYaml .Values.podMonitor.eventsource.namespace | nindent 6 }}
{{- else }}
- {{ .Release.Namespace }}
{{- end }}
podMetricsEndpoints:
- port: metrics
selector:
matchLabels:
owner-name: {{ .Values.name }}
app: {{ .Values.name }}-eventsource
{{ end }}
29 changes: 29 additions & 0 deletions argo-event/templates/sensor_podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if .Values.podMonitor.eventsensor.enable }}
# Used for Promotheous
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Values.name }}-sensor
labels:
release: prometheus-operator
{{- with .Values.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.podMonitor.eventsensor.labels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
spec:
namespaceSelector:
matchNames:
{{- if .Values.podMonitor.eventsensor.namespace -}}
{{ toYaml .Values.podMonitor.eventsensor.namespace | nindent 6 }}
{{- else }}
- {{ .Release.Namespace }}
{{- end }}
podMetricsEndpoints:
- port: metrics
selector:
matchLabels:
owner-name: {{ .Values.name }}
app: {{ .Values.name }}-sensor
{{ end }}
28 changes: 27 additions & 1 deletion argo-event/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,30 @@ ingress:
# Example
# host: testing.com

# path(string): path for this ingress
# path(string): path for this ingress

# podMonitor: optional, used to create podMonitor for argo event
podMonitor:
eventsource:
enable: false
# eventsoruce: setting for eventsource pod monitor
# field:
# enable(bool): to enable this pod monitor
# labels: extra label for this pod monitor
# namespace: the namespace of this pod monitor to watch

eventbus:
enable: false
# eventbus: setting for eventbus pod monitor
# field:
# enable(bool): to enable this pod monitor
# labels: extra label for this pod monitor
# namespace: the namespace of this pod monitor to watch

eventsensor:
enable: false
# eventsensor: setting for eventsensor pod monitor
# field:
# enable(bool): to enable this pod monitor
# labels: extra label for this pod monitor
# namespace: the namespace of this pod monitor to watch

0 comments on commit 55552af

Please sign in to comment.