Skip to content

Commit

Permalink
[kube-prometheus-stack] fix label on admission controller (#4168)
Browse files Browse the repository at this point in the history
Signed-off-by: gavin.jeong <[email protected]>
  • Loading branch information
jonasbadstuebner authored and gavin-jeong committed Jan 23, 2024
1 parent 2f3dbdd commit c36560c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-statsd-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
20 changes: 10 additions & 10 deletions charts/prometheus-statsd-exporter/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit c36560c

Please sign in to comment.