jsonnet/addons: update removal of resource limits for certain containers
This commit is contained in:
@@ -1,19 +1,32 @@
|
|||||||
// Strips spec.containers[].limits for certain containers
|
// Strips spec.containers[].limits for certain containers
|
||||||
// https://github.com/prometheus-operator/kube-prometheus/issues/72
|
// https://github.com/prometheus-operator/kube-prometheus/issues/72
|
||||||
|
|
||||||
{
|
{
|
||||||
_config+:: {
|
local noLimit(c) =
|
||||||
resources+:: {
|
//if std.objectHas(c, 'resources') && c.name != 'kube-state-metrics'
|
||||||
'addon-resizer'+: {
|
if c.name != 'kube-state-metrics'
|
||||||
limits: {},
|
then c { resources+: { limits: {} } }
|
||||||
|
else c,
|
||||||
|
|
||||||
|
nodeExporter+: {
|
||||||
|
daemonset+: {
|
||||||
|
spec+: {
|
||||||
|
template+: {
|
||||||
|
spec+: {
|
||||||
|
containers: std.map(noLimit, super.containers),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'kube-rbac-proxy'+: {
|
},
|
||||||
limits: {},
|
},
|
||||||
},
|
kubeStateMetrics+: {
|
||||||
'kube-state-metrics'+: {
|
deployment+: {
|
||||||
limits: {},
|
spec+: {
|
||||||
},
|
template+: {
|
||||||
'node-exporter'+: {
|
spec+: {
|
||||||
limits: {},
|
containers: std.map(noLimit, super.containers),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user