Skip to content

Commit

Permalink
Enable log retention in Loki and fix restjava routing (#9601)
Browse files Browse the repository at this point in the history
Enable log retention in Loki and fix restjava routing (#9600)

* Change Prometheus from time based to size based retention
* Enable 90 day log retention in Loki
* Fix restjava routing broken with Traefik v3
* Fix Traefik dashboard

---------


(cherry picked from commit 3d493af)

Signed-off-by: Steven Sheehy <[email protected]>
Signed-off-by: Jesse Nelson <[email protected]>
Co-authored-by: Steven Sheehy <[email protected]>
  • Loading branch information
jnels124 and steven-sheehy authored Oct 17, 2024
1 parent fc02307 commit 50b9b69
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
10 changes: 6 additions & 4 deletions charts/hedera-mirror-common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ loki:
storage:
type: 'filesystem'
structuredConfig:
compactor:
retention_enabled: true
limits_config:
retention_period: 1440h
ruler:
alertmanager_url: http://{{ .Release.Name }}-prometheus-alertmanager:9093
enable_alertmanager_v2: true
Expand All @@ -48,9 +52,6 @@ loki:
object_store: filesystem
schema: v13
store: tsdb
table_manager:
retention_deletes_enabled: true
retention_period: 1440h
lokiCanary:
enabled: false
monitoring:
Expand Down Expand Up @@ -370,7 +371,7 @@ prometheus:
requests:
cpu: 250m
memory: 1Gi
retention: 60d
retentionSize: 100GiB
ruleSelectorNilUsesHelmValues: false
scrapeInterval: 30s
serviceMonitorSelectorNilUsesHelmValues: false
Expand Down Expand Up @@ -473,6 +474,7 @@ traefik:
globalArguments: # Expose X-Forwarded-For header for tracing
- --entryPoints.web.forwardedHeaders.insecure
- --entryPoints.websecure.forwardedHeaders.insecure
- --api.insecure=true
logs:
access:
enabled: true
Expand Down
10 changes: 5 additions & 5 deletions charts/hedera-mirror-rest-java/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ image:
ingress:
annotations:
traefik.ingress.kubernetes.io/router.middlewares: '{{ include "hedera-mirror-rest-java.namespace" . }}-{{ include "hedera-mirror-rest-java.fullname" . }}@kubernetescrd'
traefik.ingress.kubernetes.io/router.pathmatcher: 'PathRegexp'
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
- path: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/allowances/nfts'
- path: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/outstanding'
- path: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/pending'
- path: '/api/v1/topics/(\d+\.){0,2}\d+'
tls:
enabled: false
secretName: ""
Expand Down
5 changes: 3 additions & 2 deletions charts/hedera-mirror-web3/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ image:
ingress:
annotations:
traefik.ingress.kubernetes.io/router.middlewares: '{{ include "hedera-mirror-web3.namespace" . }}-{{ include "hedera-mirror-web3.fullname" . }}@kubernetescrd'
traefik.ingress.kubernetes.io/router.pathmatcher: 'PathRegexp'
enabled: true
hosts:
- host: ""
paths:
# the rest of /api/v1/contracts will still be handled by the REST API logic, except for this one address
- "/api/v1/contracts/call"
- "/api/v1/contracts/results/{transactionIdOrHash}/opcodes"
- '/api/v1/contracts/call'
- '/api/v1/contracts/results/((0x)?[A-Fa-f0-9]{64}|\d+\.\d+\.\d+-\d+-\d+)/opcodes'
tls:
enabled: false
secretName: ""
Expand Down

0 comments on commit 50b9b69

Please sign in to comment.