Remove addon-resizer customization due to revert image

This commit is contained in:
CarlosEDP 2019-05-08 22:22:07 -03:00
parent 4bceaa67e2
commit 5590ec8538
3 changed files with 18 additions and 49 deletions

View File

@ -64,13 +64,14 @@ local vars = import 'vars.jsonnet';
//---------------------------------------
prometheus+:: {
# Add option (from vars.yaml) to enable persistence
local pvc = k.core.v1.persistentVolumeClaim,
prometheus+: {
spec+: {
retention: '15d',
externalUrl: 'http://' + $._config.urls.prom_ingress,
}
+ ( if vars.enablePersistence['prometheus'] then {
+ (if vars.enablePersistence.prometheus then {
storage: {
volumeClaimTemplate:
pvc.new() +
@ -84,7 +85,7 @@ local vars = import 'vars.jsonnet';
},
// Override deployment for Grafana data persistence
grafana+:: if vars.enablePersistence['grafana'] then {
grafana+:: if vars.enablePersistence.grafana then {
deployment+: {
spec+: {
template+: {
@ -117,38 +118,6 @@ local vars = import 'vars.jsonnet';
grafanaDashboards+:: $._config.grafanaDashboards,
kubeStateMetrics+:: {
// Override command for addon-resizer due to change from parameter --threshold to --acceptance-offset
deployment+: {
spec+: {
template+: {
spec+: {
containers:
std.map(
function(c)
if std.startsWith(c.name, 'addon-resizer') then
c {
command: [
'/pod_nanny',
'--container=kube-state-metrics',
'--cpu=100m',
'--extra-cpu=2m',
'--memory=150Mi',
'--extra-memory=30Mi',
'--acceptance-offset=5',
'--deployment=kube-state-metrics',
],
}
else
c,
super.containers,
),
},
},
},
},
},
// Create ingress objects per application
ingress+: {
local secret = k.core.v1.secret,

View File

@ -5,7 +5,7 @@
alertmanager: 'v0.16.0',
kubeStateMetrics: 'v1.5.0',
kubeRbacProxy: 'v0.4.1',
addonResizer: '2.1',
addonResizer: 'v1.8.4',
nodeExporter: 'v0.17.0',
prometheusOperator: 'v0.28.0',
prometheusAdapter: 'v0.4.1',

View File

@ -71,7 +71,7 @@ spec:
- --extra-cpu=2m
- --memory=150Mi
- --extra-memory=30Mi
- --acceptance-offset=5
- --threshold=5
- --deployment=kube-state-metrics
env:
- name: MY_POD_NAME
@ -84,7 +84,7 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
image: carlosedp/addon-resizer:2.1
image: carlosedp/addon-resizer:v1.8.4
name: addon-resizer
resources:
limits: