Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable log deletion using compactor #220

Merged
merged 5 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
loki:
overrideConfiguration:
# TODO: remove retention_period because it should be controlled by object store (minio) policies
# https://grafana.com/docs/loki/latest/operations/storage/retention/
compactor:
retention_enabled: true # enable deletion using compactor
shared_store: s3
limits_config:
retention_period: ${loki_ingester_retention_period}
schema_config:
Expand All @@ -16,6 +19,7 @@ loki:
boltdb_shipper:
shared_store: s3
aws:
# s3 is alias for aws
s3forcepathstyle: true
endpoint: ${minio_api_url}
insecure: true
Expand Down
2 changes: 2 additions & 0 deletions terraform/gitops/k8s-cluster-config/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module "generate_monitoring_files" {
grafana_wildcard_gateway = local.grafana_wildcard_gateway
loki_ingester_pvc_size = try(var.common_var_map.loki_ingester_pvc_size, local.loki_ingester_pvc_size)
prometheus_pvc_size = try(var.common_var_map.prometheus_pvc_size, local.prometheus_pvc_size)
loki_retention_enabled = try(var.common_var_map.loki_retention_enabled, local.loki_retention_enabled)
loki_ingester_retention_period = try(var.common_var_map.loki_ingester_retention_period, local.loki_ingester_retention_period)
prometheus_retention_period = try(var.common_var_map.prometheus_retention_period, local.prometheus_retention_period)
alertmanager_enabled = try(var.common_var_map.alertmanager_enabled, false)
Expand Down Expand Up @@ -117,6 +118,7 @@ locals {
monitoring_app_file = "monitoring-app.yaml"
loki_ingester_pvc_size = "50Gi"
prometheus_pvc_size = "50Gi"
loki_retention_enabled = true
loki_ingester_retention_period = "72h"
prometheus_retention_period = "10d"
prom_tsdb_min_block_duration = "30m"
Expand Down
1 change: 1 addition & 0 deletions terraform/k8s/default-config/common-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ loki_chart_version: 2.13.0
ory_stack_enabled: true
loki_ingester_pvc_size: 50Gi
prometheus_pvc_size: 50Gi
loki_retention_enabled: true
loki_ingester_retention_period: 72h
prometheus_retention_period: 10d
istio_egress_gateway_max_replicas: 5
Expand Down