Skip to content

Commit

Permalink
fix: removed trailing "d" in retention_days
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed Mar 13, 2024
1 parent b091fd0 commit 2f796ee
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion imageroot/actions/configure-module/10set
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ import agent

request = json.load(sys.stdin)

agent.set_env('LOKI_RETENTION_PERIOD', f"{request['retention_days']}d")
agent.set_env('LOKI_RETENTION_PERIOD', f"{request['retention_days']}")
2 changes: 1 addition & 1 deletion imageroot/actions/configure-module/validate-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"properties": {
"retention_days": {
"type": "integer",
"description": "Retention period of logs, in days. 0 means infinite."
"description": "Retention period of logs, in days."
}
}
}
2 changes: 1 addition & 1 deletion imageroot/actions/create-module/10env
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ agent.set_env('LOKI_API_AUTH_USERNAME', 'loki')
agent.set_env('LOKI_API_AUTH_PASSWORD', genuuid())
agent.set_env('LOKI_LOGS_INGRESS_TOKEN', genuuid())
agent.set_env('LOKI_HTTP_PORT', port)
agent.set_env('LOKI_RETENTION_PERIOD', '365d')
agent.set_env('LOKI_RETENTION_PERIOD', '365')
2 changes: 1 addition & 1 deletion imageroot/actions/get-configuration/10get
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import json
import sys

json.dump({
"retention_days": int(os.getenv('LOKI_RETENTION_PERIOD')[:-1])
"retention_days": int(os.getenv('LOKI_RETENTION_PERIOD'))
}, sys.stdout)
2 changes: 1 addition & 1 deletion imageroot/actions/get-configuration/validate-output.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"properties": {
"retention_days": {
"type": "integer",
"description": "Retention period of logs, in days. 0 means infinite."
"description": "Retention period of logs, in days."
}
}
}
2 changes: 1 addition & 1 deletion imageroot/loki-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ chunk_store_config:

table_manager:
retention_deletes_enabled: false
retention_period: ${LOKI_RETENTION_PERIOD:0s}
retention_period: ${LOKI_RETENTION_PERIOD:365}d

ruler:
storage:
Expand Down
2 changes: 1 addition & 1 deletion imageroot/update-module.d/10config
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ import agent

# Set environment variables
if os.getenv('LOKI_RETENTION_PERIOD') is None:
agent.set_env('LOKI_RETENTION_PERIOD', '365d')
agent.set_env('LOKI_RETENTION_PERIOD', '365')

0 comments on commit 2f796ee

Please sign in to comment.