forked from mongodb/mongodb-kubernetes-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mongodb.com_v1_mongodbcommunity_prometheus.yaml
66 lines (57 loc) · 1.45 KB
/
mongodb.com_v1_mongodbcommunity_prometheus.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: example-prometheus
spec:
members: 3
type: ReplicaSet
version: "6.0.5"
# You can expose metrics for Prometheus polling using the
# `prometheus` entry.
prometheus:
# Metrics endpoint HTTP Basic Auth username
username: <username>
# Metrics endpoint HTTP Basic Auth password
passwordSecretRef:
name: metrics-endpoint-password
# Optional, defaults to `/metrics`
# metricsPath: /metrics
# Optional defaults to 9216
# port: 9216
# Prometheus endpoint can be configured to use HTTPS
# tlsSecretKeyRef:
# name: "<kubernetes.io/tls secret name>"
security:
authentication:
modes: ["SCRAM"]
users:
- name: my-user
db: admin
passwordSecretRef:
name: my-user-password
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
scramCredentialsSecretName: my-scram
# the user credentials will be generated from this secret
# once the credentials are generated, this secret is no longer required
---
apiVersion: v1
kind: Secret
metadata:
name: my-user-password
type: Opaque
stringData:
password: <your-user-password>
# Secret holding the prometheus metrics endpoint HTTP Password.
---
apiVersion: v1
kind: Secret
metadata:
name: metrics-endpoint-password
type: Opaque
stringData:
password: <your-metrics-endpoint-password>