Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Cortex / Queries: added "Lazy loaded index-headers" and "Index-header lazy load duration"
- Cortex / Compactor: added "Tenants compaction progress"
- Alerts: added "CortexMemoryMapAreasTooHigh"
* [BUGFIX] Fixed workingset memory panel while rolling out a StatefulSet. #229

## 1.5.0 / 2020-11-12

Expand Down
4 changes: 3 additions & 1 deletion cortex-mixin/dashboards/dashboard-utils.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ local utils = import 'mixin-utils/utils.libsonnet';
containerMemoryWorkingSetPanel(title, containerName)::
$.panel(title) +
$.queryPanel([
'sum by(pod) (container_memory_working_set_bytes{%s,container="%s"})' % [$.namespaceMatcher(), containerName],
// We use "max" instead of "sum" otherwise during a rolling update of a statefulset we will end up
// summing the memory of the old pod (whose metric will be stale for 5m) to the new pod.
'max by(pod) (container_memory_working_set_bytes{%s,container="%s"})' % [$.namespaceMatcher(), containerName],
'min(container_spec_memory_limit_bytes{%s,container="%s"} > 0)' % [$.namespaceMatcher(), containerName],
], ['{{pod}}', 'limit']) +
{
Expand Down