Skip to content

Commit

Permalink
fix workload-namespace.libsonnet
Browse files Browse the repository at this point in the history
Fix dashboard for both notations for requests.cpu
  • Loading branch information
sveno1990 authored Jul 24, 2024
1 parent 3dfa72d commit 309a73d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dashboards/resources/workload-namespace.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ local var = g.dashboard.variable;
local memRequestsQuery = std.strReplace(cpuRequestsQuery, 'cpu', 'memory');
local memLimitsQuery = std.strReplace(cpuLimitsQuery, 'cpu', 'memory');

local cpuQuotaRequestsQuery = 'scalar(kube_resourcequota{%(clusterLabel)s="$cluster", namespace="$namespace", type="hard",resource="requests.cpu"})' % $._config;
local cpuQuotaLimitsQuery = std.strReplace(cpuQuotaRequestsQuery, 'requests.cpu', 'limits.cpu');
local memoryQuotaRequestsQuery = std.strReplace(cpuQuotaRequestsQuery, 'requests.cpu', 'requests.memory');
local memoryQuotaLimitsQuery = std.strReplace(cpuQuotaRequestsQuery, 'requests.cpu', 'limits.memory');
local cpuQuotaRequestsQuery = 'scalar(kube_resourcequota{%(clusterLabel)s="$cluster", namespace="$namespace", type="hard",resource=~"requests.cpu|cpu"})' % $._config;
local cpuQuotaLimitsQuery = std.strReplace(cpuQuotaRequestsQuery, 'requests.cpu|cpu', 'limits.cpu');
local memoryQuotaRequestsQuery = std.strReplace(cpuQuotaRequestsQuery, 'requests.cpu|cpu', 'requests.memory|memory');
local memoryQuotaLimitsQuery = std.strReplace(cpuQuotaRequestsQuery, 'requests.cpu|cpu', 'limits.memory');

local networkColumns = [
|||
Expand Down

0 comments on commit 309a73d

Please sign in to comment.