Skip to content

Commit 4ad873c

Browse files
test(metrics): Use unique names for cluster-wide Prometheus resources
1 parent fd31039 commit 4ad873c

5 files changed

Lines changed: 18 additions & 31 deletions

File tree

tests/templates/kuttl/metrics/10-assert.yaml

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

tests/templates/kuttl/metrics/11-create-service-monitor.yaml renamed to tests/templates/kuttl/metrics/10-create-service-monitor.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ apiVersion: monitoring.coreos.com/v1
33
kind: ServiceMonitor
44
metadata:
55
name: stackable-opensearch
6-
labels:
7-
release: prometheus-stack
86
spec:
97
selector:
108
matchLabels:

tests/templates/kuttl/metrics/10-install-prometheus.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
# Append the namespace to the Helm release name so that cluster-wide
6+
# resources get unique names.
7+
- script: |
8+
helm install prometheus-$NAMESPACE \
9+
--namespace $NAMESPACE \
10+
--version 80.14.2 \
11+
--values 11_kube-prometheus-stack-values.yaml \
12+
--wait \
13+
oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack
14+
15+
kubectl label servicemonitors.monitoring.coreos.com stackable-opensearch \
16+
--namespace $NAMESPACE \
17+
release=prometheus-$NAMESPACE
18+
timeout: 600

tests/templates/kuttl/metrics/10_kube-prometheus-stack-values.yaml renamed to tests/templates/kuttl/metrics/11_kube-prometheus-stack-values.yaml

File renamed without changes.

0 commit comments

Comments
 (0)