[PATCH] Add OOM patch for fixing mariadb metrics ServiceMonitor label selector
[oom/offline-installer.git] / patches / MARIADB-Use-common-labels-for-the-metrics-Service-selector.patch
1 From a9d2af7ba6ec8d2c43ff21089869ae835954c90f Mon Sep 17 00:00:00 2001
2 From: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
3 Date: Fri, 4 Feb 2022 14:19:51 +0100
4 Subject: [PATCH] [MARIADB] Use common labels for the metrics Service selector
5
6 Setting the "prometheus: kube-prometheus" label selector for mariadb-galera
7 ServiceMonitor object is invalid since mariadb-galera-metrics service has
8 common labels assigned.
9
10 Without this change Prometheus (in kube-prometheus-stack) does not select
11 the mariadb-galera-metrics service for scraping and relevant target is
12 not created.
13
14 Change-Id: I64dfe83ff7fb448125f8726cf3ca33048ced04a8
15 Issue-ID: OOM-2925
16 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
17 ---
18  kubernetes/common/mariadb-galera/values.yaml | 4 ++--
19  1 file changed, 2 insertions(+), 2 deletions(-)
20
21 diff --git a/kubernetes/common/mariadb-galera/values.yaml b/kubernetes/common/mariadb-galera/values.yaml
22 index f49a89881..9f7c88213 100644
23 --- a/kubernetes/common/mariadb-galera/values.yaml
24 +++ b/kubernetes/common/mariadb-galera/values.yaml
25 @@ -608,8 +608,8 @@ metrics:
26      ## ServiceMonitor selector labels
27      ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
28      ##
29 -    selector:
30 -      prometheus: kube-prometheus
31 +    # selector:
32 +    #   prometheus: kube-prometheus
33
34      ## RelabelConfigs to apply to samples before scraping
35      ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
36 --
37 2.17.1