Skip to content

Commit 38f8535

Browse files
authored
Generate Scylla service monitors automatically (#3983)
## Motivation There's an option that we can use in our values files that will create service monitors identical to the ones we're creating manually ## Proposal Create service monitors automatically instead ## Test Plan Will deploy using this to make sure everything is ok ## Release Plan - Nothing to do / These changes follow the usual release cycle.
1 parent 8c63a22 commit 38f8535

File tree

5 files changed

+14
-51
lines changed

5 files changed

+14
-51
lines changed

kubernetes/linera-validator/helmfile.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@ helmDefaults:
1313
recreatePods: false
1414
kubeContext: {{ .Values.kubeContext | quote }}
1515

16-
{{- if or .Values.usingLocalSsd .Values.usingRecommendedScyllaDbSettings }}
1716
hooks:
17+
- events: ["prepare"]
18+
showlogs: true
19+
command: bash
20+
args:
21+
- -lc
22+
- |
23+
set -euxo pipefail
24+
echo "Installing Prometheus ServiceMonitor CRD…"
25+
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
26+
{{- if or .Values.usingLocalSsd .Values.usingRecommendedScyllaDbSettings }}
1827
- events: ["prepare"]
1928
showlogs: true
2029
command: bash

kubernetes/linera-validator/scylla-manager.values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ scylla:
2727
requests:
2828
cpu: 1
2929
memory: 2Gi
30+
serviceMonitor:
31+
create: true

kubernetes/linera-validator/scylla.values.yaml.gotmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ racks:
1515
requests:
1616
cpu: 1
1717
memory: 2Gi
18+
serviceMonitor:
19+
create: true

kubernetes/linera-validator/templates/scylla-manager-service-monitor.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

kubernetes/linera-validator/templates/scylla-service-monitor.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)