/
tidb-ng-monitoring.yaml
171 lines (143 loc) · 6.65 KB
/
tidb-ng-monitoring.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
apiVersion: pingcap.com/v1alpha1
kind: TidbNGMonitoring
metadata:
name: main-cluster-monitoring
spec:
## tidb cluster to be monitored
## ** now only support monitoring one tidb cluster **
clusters:
- name: advanced-tidb
namespace: default
## ClusterDomain is the domain of TidbCluster object
# clusterDomain: cluster.local
## ConfigUpdateStrategy determines how the configuration change is applied to the cluster.
## Valid values are `InPlace` and `RollingUpdate`
## UpdateStrategy `InPlace` will update the ConfigMap of configuration in-place and an extra rolling update of the
## cluster component is needed to reload the configuration change.
## UpdateStrategy `RollingUpdate` will create a new ConfigMap with the new configuration and rolling update the
## related components to use the new ConfigMap, that is, the new configuration will be applied automatically.
configUpdateStrategy: RollingUpdate
## Persistent volume reclaim policy applied to the PV consumed, default to `Retain`.
## Note that the reclaim policy Recycle may not be supported by some storage types, e.g. local.
## Ref: https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/
pvReclaimPolicy: Retain
## ImagePullPolicy of Pods
## Ref: https://kubernetes.io/docs/concepts/configuration/overview/#container-images
# imagePullPolicy: IfNotPresent
## If private registry is used, imagePullSecrets may be set
## You can also set this in service account
## Ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
# imagePullSecrets:
# - name: secretName
## Specify pod priorities of pods in TidbNGMonitoring, default to empty.
## Can be overwritten by component settings.
## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
# priorityClassName: system-cluster-critical
## Use the node network namespace, default to false
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
# hostNetwork: false
## if true, this ng monitoring cluster is paused and will not be synced by the controller
# paused: false
## SchedulerName of pods.
## If specified, the pods will be scheduled by the specified scheduler.
## Can be overwritten by component settings.
# schedulerName: default-scheduler
###########################
# Components #
###########################
ngMonitoring:
## describes the compute resource requirements and limits.
## Ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
requests:
# cpu: 1000m
# memory: 1Gi
storage: 10Gi
# limits:
# cpu: 2000m
# memory: 2Gi
## version of ng-monitoring
version: nightly
## Base image of the component
baseImage: pingcap/ng-monitoring
## The storageClassName of the persistent volume for data storage.
# storageClassName: standard
## ng-monitoring configuration
# config: |
# [log]
# level = "DEBUG"
## Annotations of ng monitoring pods
# annotations:
# node.kubernetes.io/instance-type: some-vm-type
# topology.kubernetes.io/region: some-region
## Labels of ng monitoring pods
# labels: {}
## List of environment variables to set in the container
## Note that the following env names cannot be used and will be overwritten by TiDB Operator builtin envs
## - HEADLESS_SERVICE_NAME
## - POD_NAME
## Ref: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/
# env:
# - name: MY_ENV_1
# value: value1
# - name: MY_ENV_2
# valueFrom:
# fieldRef:
# fieldPath: status.myEnv2
## NodeSelector of ng monitoring pods
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
# nodeSelector:
# node-role.kubernetes.io/ngm: true
## Tolerations are applied to ng monitoring pods, allowing (but do not require) pods to be scheduled onto nodes with matching taints.
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
# tolerations:
# - effect: NoSchedule
# key: dedicated
# operator: Equal
# value: ngm
## Affinity for pod scheduling, will be overwritten by each cluster component's specific affinity setting
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
# affinity: {}
## TopologySpreadConstraints for pod scheduling, will be overwritten by each cluster component's specific spread constraints setting
## Ref: pkg/apis/pingcap/v1alpha1/types.go#TopologySpreadConstraint
# topologySpreadConstraints:
# - topologyKey: topology.kubernetes.io/zone
## Custom sidecar containers can be injected into the ng monitoring pods,
## which can act as a logging/tracing agent or for any other use case
# additionalContainers:
# - name: myCustomContainer
# image: ubuntu
## custom additional volumes in ng monitoring pods
# additionalVolumes:
# # specify volume types that are supported by Kubernetes, Ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#types-of-persistent-volumes
# - name: nfs
# nfs:
# server: 192.168.0.2
# path: /nfs
## custom additional volume mounts in ng monitoring pods
# additionalVolumeMounts:
# # this must match `name` in `additionalVolumes`
# - name: nfs
# mountPath: /nfs
## defines additional volumes for which PVCs will be created by StatefulSet controller
# storageVolumes:
# # this will be suffix of PVC names in VolumeClaimTemplates of NG Monitoring StatefulSet
# - name: volumeName
# # specify this to use special storageClass for this volume, default to component-level `storageClassName`
# storageClassName: local-storage
# # storage request of PVC
# storageSize: 1Gi
# # mount path of the PVC
# mountPath: /some/path
## Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
## Ref: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution
# terminationGracePeriodSeconds: 30
## PodSecurityContext holds pod-level security attributes and common container settings.
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
# podSecurityContext:
# sysctls:
# - name: net.ipv4.tcp_keepalive_time
# value: "300"
# - name: net.ipv4.tcp_keepalive_intvl
# value: "75"
# - name: net.core.somaxconn
# value: "32768"