kubezero/charts/kubezero-metrics/charts/kube-prometheus-stack/charts/kube-state-metrics/templates/verticalpodautoscaler.yaml

45 lines
1.5 KiB
YAML
Raw Normal View History

2022-10-27 12:27:42 +00:00
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.verticalPodAutoscaler.enabled) }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
{{- include "kube-state-metrics.labels" . | indent 4 }}
spec:
2023-08-22 13:42:24 +00:00
{{- with .Values.verticalPodAutoscaler.recommenders }}
recommenders:
{{- toYaml . | nindent 4 }}
{{- end }}
2022-10-27 12:27:42 +00:00
resourcePolicy:
containerPolicies:
- containerName: {{ template "kube-state-metrics.name" . }}
2023-08-22 13:42:24 +00:00
{{- with .Values.verticalPodAutoscaler.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.verticalPodAutoscaler.controlledValues }}
controlledValues: {{ .Values.verticalPodAutoscaler.controlledValues }}
2022-10-27 12:27:42 +00:00
{{- end }}
{{- if .Values.verticalPodAutoscaler.maxAllowed }}
maxAllowed:
{{ toYaml .Values.verticalPodAutoscaler.maxAllowed | nindent 8 }}
{{- end }}
{{- if .Values.verticalPodAutoscaler.minAllowed }}
minAllowed:
{{ toYaml .Values.verticalPodAutoscaler.minAllowed | nindent 8 }}
{{- end }}
targetRef:
apiVersion: apps/v1
2023-08-22 13:42:24 +00:00
{{- if .Values.autosharding.enabled }}
kind: StatefulSet
{{- else }}
2022-10-27 12:27:42 +00:00
kind: Deployment
2023-08-22 13:42:24 +00:00
{{- end }}
2022-10-27 12:27:42 +00:00
name: {{ template "kube-state-metrics.fullname" . }}
2023-08-22 13:42:24 +00:00
{{- with .Values.verticalPodAutoscaler.updatePolicy }}
2022-10-27 12:27:42 +00:00
updatePolicy:
2023-08-22 13:42:24 +00:00
{{- toYaml . | nindent 4 }}
2022-10-27 12:27:42 +00:00
{{- end }}
{{- end }}