From c36560c7e575e79911c3043c7ffa9f63bc01cbd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Badst=C3=BCbner?= Date: Mon, 22 Jan 2024 17:51:54 +0100 Subject: [PATCH] [kube-prometheus-stack] fix label on admission controller (#4168) Signed-off-by: gavin.jeong --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../deployment/deployment.yaml | 1 - charts/prometheus-statsd-exporter/Chart.yaml | 2 +- .../templates/hpa.yaml | 20 +++++++++---------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 950b752702e2..094caaa49860 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 56.0.2 +version: 56.0.3 appVersion: v0.71.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/deployment/deployment.yaml b/charts/kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/deployment/deployment.yaml index 5206f244aaaa..350810daef6c 100644 --- a/charts/kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/deployment/deployment.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/deployment/deployment.yaml @@ -26,7 +26,6 @@ spec: labels: app: {{ template "kube-prometheus-stack.name" . }}-operator-webhook {{- include "kube-prometheus-stack.prometheus-operator-webhook.labels" . | nindent 8 }} - release: {{ $.Release.Name | quote }} {{- if .Values.prometheusOperator.admissionWebhooks.deployment.podLabels }} {{ toYaml .Values.prometheusOperator.admissionWebhooks.deployment.podLabels | indent 8 }} {{- end }} diff --git a/charts/prometheus-statsd-exporter/Chart.yaml b/charts/prometheus-statsd-exporter/Chart.yaml index 0af866b1230d..a6786948075a 100644 --- a/charts/prometheus-statsd-exporter/Chart.yaml +++ b/charts/prometheus-statsd-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: prometheus-statsd-exporter description: A Helm chart for prometheus stats-exporter -version: 0.11.0 +version: 0.11.1 appVersion: v0.26.0 home: https://github.com/prometheus/statsd_exporter sources: diff --git a/charts/prometheus-statsd-exporter/templates/hpa.yaml b/charts/prometheus-statsd-exporter/templates/hpa.yaml index 9c0fa614b072..b48caae3df2e 100644 --- a/charts/prometheus-statsd-exporter/templates/hpa.yaml +++ b/charts/prometheus-statsd-exporter/templates/hpa.yaml @@ -14,14 +14,6 @@ spec: maxReplicas: {{ .Values.autoscaling.maxReplicas }} metrics: {{- if eq (include "prometheus-statsd-exporter.hpa.apiVersion" .) "autoscaling/v2" -}} - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: @@ -30,18 +22,26 @@ spec: type: Utilization averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} - {{- else -}} {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} + {{- else -}} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end -}} + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} {{- end }} {{- end }}