forked from hashgraph/hedera-mirror-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
values.yaml
327 lines (283 loc) · 9.73 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
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app.kubernetes.io/component: rest-java
alertmanager:
inhibitRules:
enabled: false
InhibitAllWhenPodIssues:
enabled: true
matches:
- sourceMatch:
- name: area
value: resource
targetMatch:
- name: application
value: hedera-mirror-rest-java
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: ""
global:
image: {}
middleware: false
namespaceOverride: ""
podAnnotations: {}
hpa:
behavior: {}
enabled: false
maxReplicas: 8
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
minReplicas: 1
image:
pullPolicy: IfNotPresent
pullSecrets: []
registry: gcr.io
repository: mirrornode/hedera-mirror-rest-java
tag: "" # Defaults to the chart's app version
ingress:
annotations:
traefik.ingress.kubernetes.io/router.middlewares: '{{ include "hedera-mirror-rest-java.namespace" . }}-{{ include "hedera-mirror-rest-java.fullname" . }}@kubernetescrd'
enabled: true
hosts:
- host: ""
paths:
# the rest of /api/v1/* is still handled by the Node.js based REST API logic, except for these paths
- path: "/api/v1/accounts/{id}/allowances/nfts"
- path: "/api/v1/accounts/{id}/airdrops/outstanding"
- path: "/api/v1/accounts/{id}/airdrops/pending"
- path: "/api/v1/topics/{id}"
type: Exact
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: 100ms
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
RestJavaErrors:
annotations:
description: "{{ $value | humanizePercentage }} Java REST API error rate for {{ $labels.namespace }}/{{ $labels.pod }}"
summary: "Mirror Java REST API error rate exceeds 5%"
enabled: true
expr: sum(rate(http_server_requests_seconds_count{application="hedera-mirror-rest-java", status="SERVER_ERROR"}[5m])) by (namespace, pod) / sum(rate(http_server_requests_seconds_count{application="hedera-mirror-rest-java"}[5m])) by (namespace, pod) > 0.05
for: 2m
labels:
application: hedera-mirror-rest-java
severity: critical
RestJavaHighCPU:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} CPU usage reached {{ $value | humanizePercentage }}"
summary: "Mirror Java REST API CPU usage exceeds 80%"
enabled: true
expr: sum(process_cpu_usage{application="hedera-mirror-rest-java"}) by (namespace, pod) / sum(system_cpu_count{application="hedera-mirror-rest-java"}) by (namespace, pod) > 0.8
for: 5m
labels:
application: hedera-mirror-rest-java
area: resource
severity: critical
RestJavaHighDBConnections:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} is using {{ $value | humanizePercentage }} of available database connections"
summary: "Mirror Java REST API database connection utilization exceeds 75%"
enabled: true
expr: sum(hikaricp_connections_active{application="hedera-mirror-rest-java"}) by (namespace, pod) / sum(hikaricp_connections_max{application="hedera-mirror-rest-java"}) by (namespace, pod) > 0.75
for: 5m
labels:
application: hedera-mirror-rest-java
area: resource
severity: critical
RestJavaHighFileDescriptors:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} file descriptor usage reached {{ $value | humanizePercentage }}"
summary: "Mirror Java REST API file descriptor usage exceeds 80%"
enabled: true
expr: sum(process_files_open_files{application="hedera-mirror-rest-java"}) by (namespace, pod) / sum(process_files_max_files{application="hedera-mirror-rest-java"}) by (namespace, pod) > 0.8
for: 5m
labels:
application: hedera-mirror-rest-java
area: resource
severity: critical
RestJavaHighMemory:
annotations:
description: "{{ $labels.namespace }}/{{ $labels.pod }} memory usage reached {{ $value | humanizePercentage }}"
summary: "Mirror Java REST API memory usage exceeds 80%"
enabled: true
expr: sum(jvm_memory_used_bytes{application="hedera-mirror-rest-java"}) by (namespace, pod) / sum(jvm_memory_max_bytes{application="hedera-mirror-rest-java"}) by (namespace, pod) > 0.8
for: 5m
labels:
application: hedera-mirror-rest-java
area: resource
severity: critical
RestJavaLogErrors:
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-rest-java", level="error"}[1m])) by (namespace, pod) >= 2
for: 3m
labels:
application: hedera-mirror-rest-java
severity: critical
RestJavaNoPodsReady:
annotations:
description: "No Java REST API instances are currently running in {{ $labels.namespace }}"
summary: No Java REST API instances running
enabled: true
expr: sum(kube_pod_status_ready{pod=~".*-rest-java-.*",condition="true"}) by (namespace) < 1
for: 2m
labels:
application: hedera-mirror-rest-java
area: resource
severity: critical
RestJavaNoRequests:
annotations:
description: "Java REST API has not seen any requests to {{ $labels.namespace }} for 5m"
summary: "No Java REST API requests seen for awhile"
enabled: true
expr: sum(rate(http_server_requests_seconds_count{application="hedera-mirror-rest-java"}[3m])) by (namespace) <= 0
for: 5m
labels:
application: hedera-mirror-rest-java
severity: warning
RestJavaQueryLatency:
annotations:
description: "High average database query latency of {{ $value | humanizeDuration }} for {{ $labels.namespace }}/{{ $labels.pod }}"
summary: "Mirror Java REST API query latency exceeds 1s"
enabled: true
expr: sum(rate(spring_data_repository_invocations_seconds_sum{application="hedera-mirror-rest-java"}[5m])) by (namespace, pod) / sum(rate(spring_data_repository_invocations_seconds_count{application="hedera-mirror-rest-java"}[5m])) by (namespace, pod) > 1
for: 1m
labels:
application: hedera-mirror-rest-java
severity: warning
RestJavaRequestLatency:
annotations:
description: "High average request latency of {{ $value | humanizeDuration }} for {{ $labels.namespace }}/{{ $labels.pod }}"
summary: "Mirror Rest Java API request latency exceeds 2s"
enabled: true
expr: sum(rate(http_server_requests_seconds_sum{application="hedera-mirror-rest-java"}[5m])) by (namespace, pod) / sum(rate(http_server_requests_seconds_count{application="hedera-mirror-rest-java"}[5m])) by (namespace, pod) > 2
for: 1m
labels:
application: hedera-mirror-rest-java
severity: warning
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: 1
memory: 1024Mi
revisionHistoryLimit: 3
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ALL]
readOnlyRootFilesystem: true
service:
annotations: {}
port: 80
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
test:
annotations:
helm.sh/hook: test-success
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
enabled: true
image:
pullPolicy: IfNotPresent
pullSecrets: []
repository: postman/newman
tag: 6.1.3-alpine
postman: "" # Custom postman.json in base64 encoding
priorityClassName: ""
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
temp:
mountPath: /tmp
# 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-rest-java.fullname" . }}'
temp:
emptyDir:
medium: Memory
sizeLimit: 500Mi