Skip to content

Commit 936542b

Browse files
update permission for tidb-controller-manager and add example for tidb-monitor (#1954)
* update permission for tidb-controller-manager and add example for tidb-monitor * address comments
1 parent 4b82827 commit 936542b

File tree

2 files changed

+85
-2
lines changed

2 files changed

+85
-2
lines changed

charts/tidb-operator/templates/controller-manager-rbac.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ rules:
3838
verbs: ["get", "list", "watch", "create", "update", "delete"]
3939
- apiGroups: [""]
4040
resources: ["secrets"]
41-
verbs: ["create", "get", "list", "watch"]
41+
verbs: ["create", "update", "get", "list", "watch"]
4242
- apiGroups: [""]
4343
resources: ["persistentvolumeclaims"]
4444
verbs: ["get", "list", "watch", "create", "update", "delete"]
@@ -135,7 +135,7 @@ rules:
135135
verbs: ["get", "list", "watch", "create", "update", "delete"]
136136
- apiGroups: [""]
137137
resources: ["secrets"]
138-
verbs: ["create", "get", "list", "watch"]
138+
verbs: ["create", "update", "get", "list", "watch"]
139139
- apiGroups: [""]
140140
resources: ["persistentvolumeclaims"]
141141
verbs: ["get", "list", "watch", "create", "update", "delete"]

manifests/monitor/tidb-monitor.yaml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
apiVersion: pingcap.com/v1alpha1
2+
kind: TidbMonitor
3+
metadata:
4+
name: demo
5+
spec:
6+
clusters:
7+
- name: demo
8+
prometheus:
9+
baseImage: prom/prometheus
10+
version: v2.11.1
11+
resources: {}
12+
# limits:
13+
# cpu: 8000m
14+
# memory: 8Gi
15+
# requests:
16+
# cpu: 4000m
17+
# memory: 4Gi
18+
imagePullPolicy: IfNotPresent
19+
logLevel: info
20+
reserveDays: 12
21+
service:
22+
type: NodePort
23+
portName: http-prometheus
24+
grafana:
25+
baseImage: grafana/grafana
26+
version: 6.0.1
27+
imagePullPolicy: IfNotPresent
28+
logLevel: info
29+
resources: {}
30+
# limits:
31+
# cpu: 8000m
32+
# memory: 8Gi
33+
# requests:
34+
# cpu: 4000m
35+
# memory: 4Gi
36+
username: admin
37+
password: admin
38+
envs:
39+
# Configure Grafana using environment variables except GF_PATHS_DATA, GF_SECURITY_ADMIN_USER and GF_SECURITY_ADMIN_PASSWORD
40+
# Ref https://grafana.com/docs/installation/configuration/#using-environment-variables
41+
GF_AUTH_ANONYMOUS_ENABLED: "true"
42+
GF_AUTH_ANONYMOUS_ORG_NAME: "Main Org."
43+
GF_AUTH_ANONYMOUS_ORG_ROLE: "Viewer"
44+
# if grafana is running behind a reverse proxy with subpath http://foo.bar/grafana
45+
# GF_SERVER_DOMAIN: foo.bar
46+
# GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s/grafana/"
47+
service:
48+
type: NodePort
49+
portName: http-grafana
50+
initializer:
51+
baseImage: pingcap/tidb-monitor-initializer
52+
version: v3.0.9
53+
imagePullPolicy: Always
54+
resources: {}
55+
# limits:
56+
# cpu: 50m
57+
# memory: 64Mi
58+
# requests:
59+
# cpu: 50m
60+
# memory: 64Mi
61+
reloader:
62+
baseImage: pingcap/tidb-monitor-reloader
63+
version: v1.0.1
64+
imagePullPolicy: IfNotPresent
65+
service:
66+
type: NodePort
67+
portName: tcp-reloader
68+
resources: {}
69+
# limits:
70+
# cpu: 50m
71+
# memory: 64Mi
72+
# requests:
73+
# cpu: 50m
74+
# memory: 64Mi
75+
imagePullPolicy: IfNotPresent
76+
persistent: true
77+
storageClassName: local-storage
78+
storage: 10Gi
79+
nodeSelector: {}
80+
annotations: {}
81+
tolerations: []
82+
kubePrometheusURL: http://prometheus-k8s.monitoring.svc:9090
83+
alertmanagerURL: ""

0 commit comments

Comments
 (0)