From 98639a2c5dedbe8421370307ad8c13bdc219631d Mon Sep 17 00:00:00 2001 From: dergeberl Date: Mon, 25 Jan 2021 13:16:45 +0100 Subject: [PATCH 1/3] make vpa configurable --- .../templates/_helpers.tpl | 4 ++++ .../templates/vpa.yaml | 17 +++++++++++++---- charts/gardener-extension-os-coreos/values.yaml | 9 +++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/charts/gardener-extension-os-coreos/templates/_helpers.tpl b/charts/gardener-extension-os-coreos/templates/_helpers.tpl index 7fa89853..21123058 100644 --- a/charts/gardener-extension-os-coreos/templates/_helpers.tpl +++ b/charts/gardener-extension-os-coreos/templates/_helpers.tpl @@ -1,3 +1,7 @@ +{{- define "name" -}} +gardener-extension-os-coreos +{{- end -}} + {{- define "image" -}} {{- if hasPrefix "sha256:" .Values.image.tag }} {{- printf "%s@%s" .Values.image.repository .Values.image.tag }} diff --git a/charts/gardener-extension-os-coreos/templates/vpa.yaml b/charts/gardener-extension-os-coreos/templates/vpa.yaml index 8b4c94b6..d9c61aae 100644 --- a/charts/gardener-extension-os-coreos/templates/vpa.yaml +++ b/charts/gardener-extension-os-coreos/templates/vpa.yaml @@ -1,13 +1,22 @@ ---- +{{- if .Values.vpa.enabled}} apiVersion: "autoscaling.k8s.io/v1beta2" kind: VerticalPodAutoscaler metadata: - name: gardener-extension-os-coreos-vpa + name: {{ include "name" . }}-vpa namespace: {{ .Release.Namespace }} spec: + {{- if .Values.vpa.resourcePolicy }} + resourcePolicy: + containerPolicies: + - containerName: '*' + minAllowed: + cpu: {{ required ".Values.vpa.resourcePolicy.minAllowed.cpu is required" .Values.vpa.resourcePolicy.minAllowed.cpu }} + memory: {{ required ".Values.vpa.resourcePolicy.minAllowed.memory is required" .Values.vpa.resourcePolicy.minAllowed.memory }} + {{- end }} targetRef: apiVersion: apps/v1 kind: Deployment - name: gardener-extension-os-coreos + name: {{ include "name" . }} updatePolicy: - updateMode: "Auto" + updateMode: {{ .Values.vpa.updatePolicy.updateMode }} +{{- end }} \ No newline at end of file diff --git a/charts/gardener-extension-os-coreos/values.yaml b/charts/gardener-extension-os-coreos/values.yaml index 3fc45821..607ea2de 100644 --- a/charts/gardener-extension-os-coreos/values.yaml +++ b/charts/gardener-extension-os-coreos/values.yaml @@ -5,6 +5,15 @@ image: resources: {} +vpa: + enabled: true +# resourcePolicy: +# minAllowed: +# cpu: 100m +# memory: 128Mi + updatePolicy: + updateMode: "Auto" + controllers: concurrentSyncs: 5 ignoreOperationAnnotation: false From 6d9f484d0a90780f83c0d0623e727d90e6537454 Mon Sep 17 00:00:00 2001 From: Maximilian Geberl <48486938+dergeberl@users.noreply.github.com> Date: Wed, 27 Jan 2021 08:56:27 +0100 Subject: [PATCH 2/3] add default VPA minAllowed --- charts/gardener-extension-os-coreos/templates/vpa.yaml | 4 ++-- charts/gardener-extension-os-coreos/values.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/gardener-extension-os-coreos/templates/vpa.yaml b/charts/gardener-extension-os-coreos/templates/vpa.yaml index d9c61aae..10a85aed 100644 --- a/charts/gardener-extension-os-coreos/templates/vpa.yaml +++ b/charts/gardener-extension-os-coreos/templates/vpa.yaml @@ -10,8 +10,8 @@ spec: containerPolicies: - containerName: '*' minAllowed: - cpu: {{ required ".Values.vpa.resourcePolicy.minAllowed.cpu is required" .Values.vpa.resourcePolicy.minAllowed.cpu }} - memory: {{ required ".Values.vpa.resourcePolicy.minAllowed.memory is required" .Values.vpa.resourcePolicy.minAllowed.memory }} + cpu: {{ required "vpa.resourcePolicy.minAllowed.cpu is required" .Values.vpa.resourcePolicy.minAllowed.cpu }} + memory: {{ required "vpa.resourcePolicy.minAllowed.memory is required" .Values.vpa.resourcePolicy.minAllowed.memory }} {{- end }} targetRef: apiVersion: apps/v1 diff --git a/charts/gardener-extension-os-coreos/values.yaml b/charts/gardener-extension-os-coreos/values.yaml index 607ea2de..aa244a7a 100644 --- a/charts/gardener-extension-os-coreos/values.yaml +++ b/charts/gardener-extension-os-coreos/values.yaml @@ -7,10 +7,10 @@ resources: {} vpa: enabled: true -# resourcePolicy: -# minAllowed: -# cpu: 100m -# memory: 128Mi + resourcePolicy: + minAllowed: + cpu: 50m + memory: 64Mi updatePolicy: updateMode: "Auto" From 138b7c31636d1d559f7b5428f61ef6321333f8fd Mon Sep 17 00:00:00 2001 From: Maximilian Geberl <48486938+dergeberl@users.noreply.github.com> Date: Thu, 28 Jan 2021 12:46:26 +0100 Subject: [PATCH 3/3] update example/controller-registration.yaml --- example/controller-registration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/controller-registration.yaml b/example/controller-registration.yaml index ddcbb46f..9475f016 100644 --- a/example/controller-registration.yaml +++ b/example/controller-registration.yaml @@ -12,7 +12,7 @@ spec: deployment: type: helm providerConfig: - chart: H4sIAAAAAAAAA+0af2/iOHb+zqd4y2qlmVNJCi30jtNJx1J2B12XVqXb1eh0GpnEBG+DnbMdKNOd/ez37CQQaAdoO0e13TwhSBz7/fR7fu+RkMiAciqr9FZTrpjgVaGqvpBUKO/N14FDhJNGw/4irP/a69rRca3eqDebZryGF0dvoPGV6G+ERGkiAd5IIfSmedue/0Eh3GR/d0yjCQs53j2Hxjb7o7XX7H9yXEf7H34tITfBn9z+38IF0ZpKrkALSG0NszHlMExYFDAeQkz8GxJS5TrfwtWYKVBJHAup8QL3RwRhJIYwIdof4+wDkDQimk0prtPjwjjhASLgNMSngsPbWNIRu6UBzBjO++adC+c8moPgdqVhCWIqIWKcuo57Ovg40MgbouiIyQQRXHcGEDCpHDdk2rPfKfuOO/wkPfudD4xDz3zlt2rKvSWiIcqXxDBiEVXOX1w1i/F7SG7wW0/w+necek0kE4mC3mkXCcZS/Ep97bgsoMRL5+GQ406VLwLqOS9t1d1ho/93xkRqd04m0bNobPP/eqO27v/1Wq30/30Aidk1lcbuLZjWHBLHhVu36R5WAzp1Aqp8yWJtx9vwHo8F8M3mgJGQoMcUfsz2ETqVpOcD/OGaMDNwx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