From 2f532e79cfd5a2d94df1c06c6d94b58c89936eaa Mon Sep 17 00:00:00 2001 From: "David J. M. Karlsen" Date: Fri, 1 Apr 2022 13:50:40 +0200 Subject: [PATCH] Add support for servicemonitor for mcrouter, bump image (#156) --- charts/mcrouter/Chart.yaml | 2 +- charts/mcrouter/templates/servicemonitor.yaml | 16 ++++++++++++++++ charts/mcrouter/values.yaml | 4 +++- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 charts/mcrouter/templates/servicemonitor.yaml diff --git a/charts/mcrouter/Chart.yaml b/charts/mcrouter/Chart.yaml index 17d292a..5182118 100644 --- a/charts/mcrouter/Chart.yaml +++ b/charts/mcrouter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: mcrouter home: https://github.com/facebook/mcrouter icon: https://img.stackshare.io/service/4370/G7xgmEZ.png -version: 0.2.6 +version: 0.3.0 appVersion: 0.40.0 description: Mcrouter is a memcached protocol router for scaling memcached deployments. sources: diff --git a/charts/mcrouter/templates/servicemonitor.yaml b/charts/mcrouter/templates/servicemonitor.yaml new file mode 100644 index 0000000..e2ed0ca --- /dev/null +++ b/charts/mcrouter/templates/servicemonitor.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.exporter.serviceMonitor.enabled .Values.exporter.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "fullname" . }} +spec: + endpoints: + - path: /metrics + port: monitoring + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + app: {{ template "fullname" . }} +{{- end -}} diff --git a/charts/mcrouter/values.yaml b/charts/mcrouter/values.yaml index 8360b2f..8554ad3 100644 --- a/charts/mcrouter/values.yaml +++ b/charts/mcrouter/values.yaml @@ -1,5 +1,5 @@ ## Container image -image: quay.io/evryfs/docker-mcrouter:0.40.0-6 +image: quay.io/evryfs/docker-mcrouter:0.40.0-8 ## Memcached chart parameters memcached: @@ -59,6 +59,8 @@ statefulset: exporter: enabled: false + serviceMonitor: + enabled: false image: repository: quay.io/dev25/mcrouter_exporter tag: 0.1.0