From dbaf61d6626a51db4fb4e9f2b7a9643aa47c6c48 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 27 Dec 2021 23:24:35 +0800 Subject: [PATCH] chart: add podmonitor --- charts/bbgo/templates/podmonitor.yaml | 15 +++++++++++++++ charts/bbgo/values.yaml | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 charts/bbgo/templates/podmonitor.yaml diff --git a/charts/bbgo/templates/podmonitor.yaml b/charts/bbgo/templates/podmonitor.yaml new file mode 100644 index 000000000..ce96fb638 --- /dev/null +++ b/charts/bbgo/templates/podmonitor.yaml @@ -0,0 +1,15 @@ +{{- if .Values.metrics.enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "bbgo.fullname" . }} + labels: + {{- include "bbgo.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "bbgo.selectorLabels" . | nindent 6 }} + podMetricsEndpoints: + - port: metrics +{{- end }} \ No newline at end of file diff --git a/charts/bbgo/values.yaml b/charts/bbgo/values.yaml index aaec58c3e..2d9e55345 100644 --- a/charts/bbgo/values.yaml +++ b/charts/bbgo/values.yaml @@ -64,6 +64,9 @@ ingress: # hosts: # - chart-example.local +metrics: + enabled: false + resources: # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little