Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Fixed: wrong variable at serviceMonitor template, introduce servicemo…
Browse files Browse the repository at this point in the history
…nitor: enabled option and make additionalLables inherited under it (#21478)

Signed-off-by: Maria.Kotlyarevskaya <maria.kotlyarevskaya@nordigy.ru>

Co-authored-by: Maria.Kotlyarevskaya <maria.kotlyarevskaya@nordigy.ru>
  • Loading branch information
Maria Kotlyarevskaya and Maria.Kotlyarevskaya authored Mar 17, 2020
1 parent 8829515 commit b7e901c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion incubator/cassandra/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: cassandra
version: 0.14.3
version: 0.14.4
appVersion: 3.11.5
description: Apache Cassandra is a free and open-source distributed database management
system designed to handle large amounts of data across many commodity servers, providing
Expand Down
4 changes: 2 additions & 2 deletions incubator/cassandra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ The following table lists the configurable parameters of the Cassandra chart and
| `backup.destination` | Destination to store backup artifacts | `s3://bucket/cassandra` |
| `backup.google.serviceAccountSecret` | Secret containing credentials if GCS is used as destination | |
| `exporter.enabled` | Enable Cassandra exporter | `false` |
| `exporter.servicemonitor` | Enable ServiceMonitor for exporter | `true` |
| `exporter.additionalLabels` | Additional labels for Service Monitor | `{}` |
| `exporter.servicemonitor.enabled` | Enable ServiceMonitor for exporter | `true` |
| `exporter.servicemonitor.additionalLabels`| Additional labels for Service Monitor | `{}` |
| `exporter.image.repo` | Exporter image repository | `criteord/cassandra_exporter` |
| `exporter.image.tag` | Exporter image tag | `2.0.2` |
| `exporter.port` | Exporter port | `5556` |
Expand Down
6 changes: 3 additions & 3 deletions incubator/cassandra/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.exporter.enabled .Values.exporter.servicemonitor }}
{{- if and .Values.exporter.enabled .Values.exporter.servicemonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand All @@ -9,8 +9,8 @@ metadata:
chart: {{ template "cassandra.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}
{{- if .Values.exporter.servicemonitor.additionalLabels }}
{{ toYaml .Values.exporter.servicemonitor.additionalLabels | indent 4 }}
{{- end }}
spec:
jobLabel: {{ template "cassandra.name" . }}
Expand Down
9 changes: 5 additions & 4 deletions incubator/cassandra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ backup:
## ref: https://github.com/criteo/cassandra_exporter
exporter:
# If exporter is enabled this will create a ServiceMonitor by default as well
servicemonitor: true
enabled: false
additionalLabels: {}
# prometheus: default
enabled: true

This comment has been minimized.

Copy link
@Simon3

Simon3 Mar 23, 2020

Contributor

why do you enable this by default, just let it to false like it has always been?

servicemonitor:
enabled: true

This comment has been minimized.

Copy link
@naseemkullah

naseemkullah Mar 21, 2020

Collaborator

Could this be set to false by default? serviceMonitor is a CRD so breaks build here: https://github.com/jaegertracing/helm-charts/runs/524418629

additionalLabels: {}
# prometheus: default
image:
repo: criteord/cassandra_exporter
tag: 2.0.2
Expand Down

0 comments on commit b7e901c

Please sign in to comment.