-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathvalues.yaml
358 lines (313 loc) · 10.5 KB
/
values.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app.kubernetes.io/component: grpc
alertmanager:
inhibitRules:
enabled: false
InhibitAllWhenPodIssues:
enabled: true
matches:
- sourceMatch:
- name: area
value: resource
targetMatch:
- name: application
value: hedera-mirror-grpc
equal:
- namespace
- pod
InhibitGrpcLogAlertWhenHighErrors:
enabled: true
matches:
- sourceMatch:
- name: alertname
value: GrpcErrors
targetMatch:
- name: alertname
value: GrpcLogErrors
equal:
- namespace
- pod
annotations: {}
config: {}
# Environment variables to add to the container. The value can either be a string or an EnvVarSource. Evaluated as a template.
env:
SPRING_CONFIG_ADDITIONAL_LOCATION: "file:/usr/etc/hedera/"
# FOO:
# valueFrom:
# secretKeyRef:
# name: '{{ .Release.Name }}-custom'
# key: BAR
# Add config maps or secrets as environment variables. Evaluated as a template.
envFrom: []
# - secretRef:
# name: '{{ .Release.Name }}-env'
fullnameOverride: ""
gateway:
gcp:
backendPolicy:
connectionDraining:
drainingTimeoutSec: 10
logging:
enabled: false
maxRatePerEndpoint: 250 # Requires a change to HPA to take effect
sessionAffinity:
type: CLIENT_IP
timeoutSec: 20
enabled: true
healthCheckPolicy:
config:
httpHealthCheck:
port: 8081
requestPath: "{{ .Values.readinessProbe.httpGet.path }}"
type: HTTP
healthyThreshold: 1
rules:
- backendRefs:
- group: "{{ .Values.gateway.target.group }}"
kind: "{{ .Values.gateway.target.kind }}"
name: "{{ include \"hedera-mirror-grpc.fullname\" $ }}"
port: 5600
matches:
- method:
service: com.hedera.mirror.api.proto.ConsensusService
- method:
service: com.hedera.mirror.api.proto.NetworkService
- method:
service: grpc.reflection.v1alpha.ServerReflection
target:
group: ""
kind: Service
global:
gateway:
enabled: false
hostnames: []
image: {}
middleware: false
namespaceOverride: ""
podAnnotations: {}
hpa:
behavior: {}
enabled: false
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
minReplicas: 1
image:
pullPolicy: IfNotPresent
pullSecrets: []
registry: gcr.io
repository: mirrornode/hedera-mirror-grpc
tag: "" # Defaults to the chart's app version
ingress:
annotations:
traefik.ingress.kubernetes.io/router.middlewares: '{{ include "hedera-mirror-grpc.namespace" . }}-{{ include "hedera-mirror-grpc.fullname" . }}@kubernetescrd'
enabled: true
hosts:
- host: ""
paths:
- "/com.hedera.mirror.api.proto.ConsensusService"
- "/com.hedera.mirror.api.proto.NetworkService"
- "/grpc.reflection.v1alpha.ServerReflection"
tls:
enabled: false
secretName: ""
labels: {}
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: http
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 2
middleware:
- circuitBreaker:
expression: NetworkErrorRatio() > 0.10 || ResponseCodeRatio(500, 600, 0, 600) > 0.25
- retry:
attempts: 3
initialInterval: 250ms
nameOverride: ""
nodeSelector: {}
podAnnotations: {}
podDisruptionBudget:
enabled: false
# maxUnavailable: 0
minAvailable: 50%
podSecurityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
priorityClassName: ""
prometheusRules:
enabled: false
GrpcErrors:
annotations:
description: '{{ $value | humanizePercentage }} gRPC {{ $labels.statusCode }} error rate for {{ $labels.namespace }}/{{ $labels.pod }}'
summary: "Mirror gRPC API error rate exceeds 5%"
enabled: true
expr: sum(rate(grpc_server_processing_duration_seconds_count{application="hedera-mirror-grpc", statusCode!~"CANCELLED|DEADLINE_EXCEEDED|INVALID_ARGUMENT|NOT_FOUND|OK"}[5m])) by (namespace, pod, statusCode) / sum(rate(grpc_server_processing_duration_seconds_count{application="hedera-mirror-grpc"}[5m])) by (namespace, pod, statusCode) > 0.05
for: 2m
labels:
severity: critical
application: hedera-mirror-grpc
GrpcHighCPU:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} CPU usage reached {{ $value | humanizePercentage }}"
summary: "Mirror gRPC API CPU usage exceeds 80%"
enabled: true
expr: sum(process_cpu_usage{application="hedera-mirror-grpc"}) by (namespace, pod) / sum(system_cpu_count{application="hedera-mirror-grpc"}) by (namespace, pod) > 0.8
for: 5m
labels:
severity: critical
application: hedera-mirror-grpc
area: resource
GrpcHighDBConnections:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} is using {{ $value | humanizePercentage }} of available database connections"
summary: "Mirror gRPC API database connection utilization exceeds 75%"
enabled: true
expr: sum(hikaricp_connections_active{application="hedera-mirror-grpc"}) by (namespace, pod) / sum(hikaricp_connections_max{application="hedera-mirror-grpc"}) by (namespace, pod) > 0.75
for: 5m
labels:
severity: critical
application: hedera-mirror-grpc
area: resource
GrpcHighFileDescriptors:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} file descriptor usage reached {{ $value | humanizePercentage }}"
summary: "Mirror gRPC API file descriptor usage exceeds 80%"
enabled: true
expr: sum(process_files_open_files{application="hedera-mirror-grpc"}) by (namespace, pod) / sum(process_files_max_files{application="hedera-mirror-grpc"}) by (namespace, pod) > 0.8
for: 5m
labels:
severity: critical
application: hedera-mirror-grpc
area: resource
GrpcHighLatency:
annotations:
description: 'High latency of {{ $value | humanizeDuration }} between the main nodes and {{ $labels.namespace }}/{{ $labels.pod }}'
summary: "Mirror gRPC API consensus to delivery (C2MD) latency exceeds 15s"
enabled: true
expr: sum(rate(hedera_mirror_grpc_consensus_latency_seconds_sum{application="hedera-mirror-grpc"}[5m])) by (namespace, pod) / sum(rate(hedera_mirror_grpc_consensus_latency_seconds_count{application="hedera-mirror-grpc"}[5m])) by (namespace, pod) > 15
for: 1m
labels:
severity: critical
application: hedera-mirror-grpc
GrpcHighMemory:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} memory usage reached {{ $value | humanizePercentage }}"
summary: "Mirror gRPC API memory usage exceeds 80%"
enabled: true
expr: sum(jvm_memory_used_bytes{application="hedera-mirror-grpc"}) by (namespace, pod) / sum(jvm_memory_max_bytes{application="hedera-mirror-grpc"}) by (namespace, pod) > 0.8
for: 5m
labels:
severity: critical
application: hedera-mirror-grpc
area: resource
GrpcLogErrors:
annotations:
description: "Logs for {{ $labels.namespace }}/{{ $labels.pod }} have reached {{ $value }} error messages/s in a 3m period"
summary: "High rate of log errors"
enabled: true
expr: sum(increase(logback_events_total{application="hedera-mirror-grpc", level="error"}[1m])) by (namespace, pod) >= 2
for: 3m
labels:
severity: critical
application: hedera-mirror-grpc
GrpcNoPodsReady:
annotations:
description: "No gRPC API instances are currently running in {{ $labels.namespace }}"
summary: No gRPC API instances running
enabled: true
expr: sum(kube_pod_status_ready{pod=~".*-grpc-.*",condition="true"}) by (namespace) < 1
for: 2m
labels:
severity: critical
application: hedera-mirror-grpc
area: resource
GrpcNoSubscribers:
annotations:
description: "{{ $labels.namespace }} has {{ $value }} subscribers for {{ $labels.type }}"
summary: "Mirror gRPC API has no subscribers"
enabled: true
expr: sum(hedera_mirror_grpc_subscribers{application="hedera-mirror-grpc"}) by (namespace, type) <= 0
for: 5m
labels:
severity: critical
application: hedera-mirror-grpc
GrpcQueryLatency:
annotations:
description: "High average database query latency of {{ $value | humanizeDuration }} for {{ $labels.namespace }}/{{ $labels.pod }}"
summary: "Mirror gRPC API query latency exceeds 1s"
enabled: true
expr: sum(rate(spring_data_repository_invocations_seconds_sum{application="hedera-mirror-grpc"}[5m])) by (namespace, pod) / sum(rate(spring_data_repository_invocations_seconds_count{application="hedera-mirror-grpc"}[5m])) by (namespace, pod) > 1
for: 1m
labels:
severity: warning
application: hedera-mirror-grpc
rbac:
enabled: true
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: http
initialDelaySeconds: 40
timeoutSeconds: 2
# Only set if HPA is disabled
# replicas: 1
resources:
limits:
cpu: 2
memory: 2048Mi
requests:
cpu: 100m
memory: 128Mi
revisionHistoryLimit: 3
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ALL]
readOnlyRootFilesystem: true
service:
annotations:
traefik.ingress.kubernetes.io/service.serversscheme: h2c
port: 5600
type: ClusterIP
serviceAccount:
create: true
# The name of the service account to use. If not set and create is true, a name is generated using the fullname template
name:
serviceMonitor:
enabled: false
interval: 30s
terminationGracePeriodSeconds: 60
tolerations: []
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 10%
maxUnavailable: 25%
# Volumes to add to the container. The key is the volume name and the value is the volume mount definition. The same keys should also appear in volumes below.
volumeMounts:
config:
mountPath: /usr/etc/hedera
# Volume mounts to add to the container. The key is the volume name and the value is the volume definition. Evaluated as a template.
volumes:
config:
secret:
defaultMode: 420
secretName: '{{ include "hedera-mirror-grpc.fullname" . }}'