Skip to content

Commit f5554c1

Browse files
committed
feat(helm): add support for vpa
Signed-off-by: t3mi <t3mi@users.noreply.github.com>
1 parent f839e2f commit f5554c1

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{- if .Values.verticalPodAutoscaler.enabled }}
2+
apiVersion: autoscaling.k8s.io/v1
3+
kind: VerticalPodAutoscaler
4+
metadata:
5+
name: azureserviceoperator
6+
namespace: {{ .Release.Namespace }}
7+
spec:
8+
{{- with .Values.verticalPodAutoscaler.recommenders }}
9+
recommenders:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
resourcePolicy:
13+
containerPolicies:
14+
- containerName: manager
15+
{{- with .Values.verticalPodAutoscaler.controlledResources }}
16+
controlledResources:
17+
{{- toYaml . | nindent 8 }}
18+
{{- end }}
19+
{{- if .Values.verticalPodAutoscaler.controlledValues }}
20+
controlledValues: {{ .Values.verticalPodAutoscaler.controlledValues }}
21+
{{- end }}
22+
{{- if .Values.verticalPodAutoscaler.maxAllowed }}
23+
maxAllowed:
24+
{{- toYaml .Values.verticalPodAutoscaler.maxAllowed | nindent 8 }}
25+
{{- end }}
26+
{{- if .Values.verticalPodAutoscaler.minAllowed }}
27+
minAllowed:
28+
{{- toYaml .Values.verticalPodAutoscaler.minAllowed | nindent 8 }}
29+
{{- end }}
30+
targetRef:
31+
apiVersion: apps/v1
32+
kind: Deployment
33+
name: azureserviceoperator-controller-manager
34+
{{- with .Values.verticalPodAutoscaler.updatePolicy }}
35+
updatePolicy:
36+
{{- toYaml . | nindent 4 }}
37+
{{- end }}
38+
{{- end }}

v2/charts/azure-service-operator/values.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,35 @@ rateLimit:
201201
qps: 5
202202
# The size of the bucket. This value only has an effect if mode is 'bucket'.
203203
bucketSize: 100
204+
205+
verticalPodAutoscaler:
206+
# If true creates a Vertical Pod Autoscaler.
207+
enabled: false
208+
209+
# Recommender responsible for generating recommendation for the object.
210+
# List should be empty (then the default recommender will generate the recommendation)
211+
# or contain exactly one recommender.
212+
recommenders: []
213+
# - name: custom-recommender-performance
214+
215+
# List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
216+
controlledResources: []
217+
# Specifies which resource values should be controlled: RequestsOnly or RequestsAndLimits.
218+
controlledValues: RequestsAndLimits
219+
220+
# Define the max allowed resources for the pod
221+
maxAllowed: {}
222+
# cpu: 500m
223+
# memory: 512Mi
224+
# Define the min allowed resources for the pod
225+
minAllowed: {}
226+
# cpu: 200m
227+
# memory: 256Mi
228+
229+
updatePolicy:
230+
# Specifies minimal number of replicas which need to be alive for VPA Updater to attempt pod eviction
231+
minReplicas: 1
232+
233+
# Specifies whether recommended updates are applied when a Pod is started and whether recommended updates
234+
# are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto".
235+
updateMode: Auto

0 commit comments

Comments
 (0)