Initial commit
This commit is contained in:
41
charts/alloy/templates/vpa.yaml
Normal file
41
charts/alloy/templates/vpa.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
{{- if .Capabilities.APIVersions.Has "autoscaling.k8s.io/v1" -}}
|
||||
{{- if .Values.controller.autoscaling.vertical.enabled -}}
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "alloy.fullname" . }}
|
||||
labels:
|
||||
{{- include "alloy.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: availability
|
||||
spec:
|
||||
{{- with .Values.controller.autoscaling.vertical }}
|
||||
{{- with .recommenders }}
|
||||
recommenders:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .resourcePolicy }}
|
||||
resourcePolicy:
|
||||
{{- with .containerPolicies }}
|
||||
containerPolicies:
|
||||
{{- range . }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .updatePolicy }}
|
||||
updatePolicy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
{{- if eq .Values.controller.type "deployment" }}
|
||||
kind: Deployment
|
||||
{{- else if eq .Values.controller.type "statefulset" }}
|
||||
kind: StatefulSet
|
||||
{{- else }}
|
||||
kind: DaemonSet
|
||||
{{- end }}
|
||||
name: {{ include "alloy.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user