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,27 +64,28 @@ local vars = import 'vars.jsonnet';
//--------------------------------------- //---------------------------------------
prometheus+:: { prometheus+:: {
# Add option (from vars.yaml) to enable persistence
local pvc = k.core.v1.persistentVolumeClaim, local pvc = k.core.v1.persistentVolumeClaim,
prometheus+: { prometheus+: {
spec+: { spec+: {
retention: '15d', retention: '15d',
externalUrl: 'http://' + $._config.urls.prom_ingress, externalUrl: 'http://' + $._config.urls.prom_ingress,
} }
+ ( if vars.enablePersistence['prometheus'] then { + (if vars.enablePersistence.prometheus then {
storage: { storage: {
volumeClaimTemplate: volumeClaimTemplate:
pvc.new() + pvc.new() +
pvc.mixin.spec.withAccessModes('ReadWriteOnce') + pvc.mixin.spec.withAccessModes('ReadWriteOnce') +
pvc.mixin.spec.resources.withRequests({ storage: '20Gi' }), pvc.mixin.spec.resources.withRequests({ storage: '20Gi' }),
// Uncomment below to define a StorageClass name // Uncomment below to define a StorageClass name
//+ pvc.mixin.spec.withStorageClassName('nfs-master-ssd'), //+ pvc.mixin.spec.withStorageClassName('nfs-master-ssd'),
}, },
} else {}), } else {}),
}, },
}, },
// Override deployment for Grafana data persistence // Override deployment for Grafana data persistence
grafana+:: if vars.enablePersistence['grafana'] then { grafana+:: if vars.enablePersistence.grafana then {
deployment+: { deployment+: {
spec+: { spec+: {
template+: { template+: {
@ -117,38 +118,6 @@ local vars = import 'vars.jsonnet';
grafanaDashboards+:: $._config.grafanaDashboards, 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 // Create ingress objects per application
ingress+: { ingress+: {
local secret = k.core.v1.secret, local secret = k.core.v1.secret,

View File

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

View File

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