Skip to content

Commit

Permalink
fix: Fix queries to overcome duplicate metrics from KSM during rollou…
Browse files Browse the repository at this point in the history
…t/restart
  • Loading branch information
tiithansen committed May 25, 2024
1 parent 5d6e5a1 commit ab5f320
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/pages/Workloads/pages/PodPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ function getMemoryPanel(pod: string) {
},
{
refId: 'memory_requests',
expr: `sum(kube_pod_container_resource_requests{resource="memory", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
expr: `max(kube_pod_container_resource_requests{resource="memory", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
instant: false,
timeseries: true,
legendFormat: 'Requests {{container}}'
},
{
refId: 'memory_limit',
expr: `sum(kube_pod_container_resource_limits{resource="memory", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
expr: `max(kube_pod_container_resource_limits{resource="memory", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
instant: false,
timeseries: true,
legendFormat: 'Limits {{container}}'
Expand Down Expand Up @@ -78,14 +78,14 @@ function getCPUPanel(pod: string) {
},
{
refId: 'cpu_requests',
expr: `sum(kube_pod_container_resource_requests{resource="cpu", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
expr: `max(kube_pod_container_resource_requests{resource="cpu", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
instant: false,
timeseries: true,
legendFormat: 'Requests {{container}}'
},
{
refId: 'cpu_limit',
expr: `sum(kube_pod_container_resource_limits{resource="cpu", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
expr: `max(kube_pod_container_resource_limits{resource="cpu", pod="${pod}",cluster="$cluster", container!=""}) by (pod, container)`,
instant: false,
timeseries: true,
legendFormat: 'Limits {{container}}'
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Workloads/tabs/Pods/PodExpandedRow.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ab5f320

Please sign in to comment.