Skip to content
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
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: pgdog-control
description: PgDog Control
type: application
version: 0.2.17
version: 0.2.18
appVersion: "84c7c56a"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ control:
evict_after_secs: 60
metrics_retention_secs: 300
query_history_limit: 1000
query_plans_limit: 100
slow_queries_threshold: 5000
autoreload: immediately # or in_sync, or off
```
Expand All @@ -713,6 +714,7 @@ control:
| `evict_after_secs` | Instance is dropped from the store entirely if its newest metric is older than this (int, default `60`). |
| `metrics_retention_secs` | How much per-instance metric history is kept in memory. Older points are dropped as new ones arrive (int, default `300`). |
| `query_history_limit` | Per-token historical query store capacity. Oldest deduped query entries are evicted first once the limit is reached (int, default `1000`). |
| `query_plans_limit` | Per-token query-plan capacity. Plans with the oldest creation time are evicted first once the limit is reached; `0` disables plan storage (int, default `100`). |
| `slow_queries_threshold` | Minimum query duration, in milliseconds, for classifying a query as slow (int, default `5000`). |
| `autoreload` | Automatically enqueue `reload_configuration` for instances that report config drift (enum, default `off`, available options: `off`, `immediately`, `in_sync`). |

Expand Down
3 changes: 3 additions & 0 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ data:
{{- if hasKey . "query_history_limit" }}
query_history_limit = {{ .query_history_limit }}
{{- end }}
{{- if hasKey . "query_plans_limit" }}
query_plans_limit = {{ .query_plans_limit }}
{{- end }}
{{- if hasKey . "slow_queries_threshold" }}
slow_queries_threshold = {{ .slow_queries_threshold }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ done
echo ""
echo "==> Verifying query alert settings..."
full_render=$(helm template test-release "$CHART_DIR" -f "$TEST_DIR/values-full.yaml")
grep -q '^ query_plans_limit = 75$' <<< "$full_render"
grep -q '^ slow_queries_threshold = 2500$' <<< "$full_render"
grep -q '^ slow_queries = true$' <<< "$full_render"

Expand Down
1 change: 1 addition & 0 deletions test/values-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ control:
process_notify_interval_secs: 30
metrics_retention_secs: 600
query_history_limit: 500
query_plans_limit: 75
slow_queries_threshold: 2500
autoreload: "immediately"
autoscaling:
Expand Down
1 change: 1 addition & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ control:
# process_notify_interval_secs: 60
# metrics_retention_secs: 300
# query_history_limit: 1000
# query_plans_limit: 100 # Set to 0 to disable query-plan storage.
# slow_queries_threshold: 5000 # Minimum query duration in milliseconds.
# autoreload: off
autoscaling: {}
Expand Down
Loading