move resources requests/limits to _config and simplify mixin
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
// Strips spec.containers[].limits for certain containers
|
||||
// https://github.com/coreos/kube-prometheus/issues/72
|
||||
{
|
||||
nodeExporter+: {
|
||||
daemonset+: {
|
||||
spec+: {
|
||||
template+: {
|
||||
spec+: {
|
||||
local stripLimits(c) =
|
||||
if std.setMember(c.name, [
|
||||
'kube-rbac-proxy',
|
||||
'node-exporter',
|
||||
])
|
||||
then c + {resources+: {limits: {}}}
|
||||
else c,
|
||||
containers: std.map(stripLimits, super.containers),
|
||||
},
|
||||
},
|
||||
_config+:: {
|
||||
resources+:: {
|
||||
'addon-resizer': {
|
||||
limits: {},
|
||||
},
|
||||
'kube-rbac-proxy': {
|
||||
limits: {},
|
||||
},
|
||||
'node-exporter': {
|
||||
limits: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -34,23 +29,4 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
kubeStateMetrics+: {
|
||||
deployment+: {
|
||||
spec+: {
|
||||
template+: {
|
||||
spec+: {
|
||||
local stripLimits(c) =
|
||||
if std.setMember(c.name, [
|
||||
'addon-resizer',
|
||||
'kube-rbac-proxy-main',
|
||||
'kube-rbac-proxy-self',
|
||||
])
|
||||
then c + {resources+: {limits: {}}}
|
||||
else c,
|
||||
containers: std.map(stripLimits, super.containers),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user