Skip to content

Commit ee5a34e

Browse files
committed
Add example ScyllaDBMonitoring configured with external Prometheus
1 parent 5369935 commit ee5a34e

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: scylla.scylladb.com/v1alpha1
2+
kind: ScyllaDBMonitoring
3+
metadata:
4+
name: scylla-monitoring
5+
namespace: scylla
6+
spec:
7+
type: Platform
8+
endpointsSelector:
9+
matchLabels:
10+
app.kubernetes.io/name: scylla
11+
scylla-operator.scylladb.com/scylla-service-type: member
12+
scylla/cluster: scylla
13+
components:
14+
prometheus:
15+
mode: External
16+
grafana:
17+
datasources:
18+
# Prometheus datasource pointing to OpenShift's Thanos Querier service.
19+
# To make this work, `cluster-monitoring-config` ConfigMap in `openshift-monitoring` namespace must be configured
20+
# to contain `config.yaml` key with `enableUserWorkload: true` in its content.
21+
# See https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/monitoring/configuring-user-workload-monitoring#enabling-monitoring-for-user-defined-projects_preparing-to-configure-the-monitoring-stack-uwm for details.
22+
- type: Prometheus
23+
url: "https://thanos-querier.openshift-monitoring.svc:9091"
24+
prometheusOptions:
25+
tls:
26+
caCertConfigMapRef:
27+
name: openshift-service-ca.crt
28+
key: service-ca.crt
29+
auth:
30+
type: BearerToken
31+
bearerTokenOptions:
32+
secretRef:
33+
# This is a `kubernetes.io/service-account-token` type of Secret created for a ServiceAccount bound to
34+
# `cluster-monitoring-view` ClusterRole.
35+
name: scylla-monitoring-grafana-token
36+
key: token
37+
exposeOptions:
38+
webInterface:
39+
ingress:
40+
ingressClassName: haproxy
41+
dnsDomains:
42+
- example-grafana.test.svc.cluster.local
43+
annotations:
44+
haproxy-ingress.github.io/ssl-passthrough: "true"

0 commit comments

Comments
 (0)