Skip to content

Commit 1371383

Browse files
committed
feat(helm): add support for vpa
Signed-off-by: t3mi <[email protected]>
1 parent 64c179a commit 1371383

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 38 additions & 0 deletions
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
@@ -269,3 +269,35 @@ serviceAccount:
269269
# If not set and create is true, `azureserviceoperator-default` would be used as a name
270270
name: ""
271271
annotations: {}
272+
273+
verticalPodAutoscaler:
274+
# If true creates a Vertical Pod Autoscaler.
275+
enabled: false
276+
277+
# Recommender responsible for generating recommendation for the object.
278+
# List should be empty (then the default recommender will generate the recommendation)
279+
# or contain exactly one recommender.
280+
recommenders: []
281+
# - name: custom-recommender-performance
282+
283+
# List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
284+
controlledResources: []
285+
# Specifies which resource values should be controlled: RequestsOnly or RequestsAndLimits.
286+
controlledValues: RequestsAndLimits
287+
288+
# Define the max allowed resources for the pod
289+
maxAllowed: {}
290+
# cpu: 500m
291+
# memory: 512Mi
292+
# Define the min allowed resources for the pod
293+
minAllowed: {}
294+
# cpu: 200m
295+
# memory: 256Mi
296+
297+
updatePolicy:
298+
# Specifies minimal number of replicas which need to be alive for VPA Updater to attempt pod eviction
299+
minReplicas: 1
300+
301+
# Specifies whether recommended updates are applied when a Pod is started and whether recommended updates
302+
# are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto".
303+
updateMode: Auto

0 commit comments

Comments
 (0)