use std.setMember instead of std.count

This commit is contained in:
Benoit Gagnon
2019-06-24 11:43:22 -04:00
parent 8e7d55d795
commit ffc8832ef9

View File

@@ -7,10 +7,10 @@
template+: { template+: {
spec+: { spec+: {
local stripLimits(c) = local stripLimits(c) =
if std.count([ if std.setMember(c.name, [
'node-exporter', 'kube-rbac-proxy',
'kube-rbac-proxy' 'node-exporter',
], c.name) > 0 ])
then c + {resources+: {limits: {}}} then c + {resources+: {limits: {}}}
else c, else c,
containers: std.map(stripLimits, super.containers), containers: std.map(stripLimits, super.containers),
@@ -40,11 +40,11 @@
template+: { template+: {
spec+: { spec+: {
local stripLimits(c) = local stripLimits(c) =
if std.count([ if std.setMember(c.name, [
'kube-rbac-proxy-main', 'addon-resizer',
'kube-rbac-proxy-self', 'kube-rbac-proxy-main',
'addon-resizer' 'kube-rbac-proxy-self',
], c.name) > 0 ])
then c + {resources+: {limits: {}}} then c + {resources+: {limits: {}}}
else c, else c,
containers: std.map(stripLimits, super.containers), containers: std.map(stripLimits, super.containers),