Skip to content

Commit 806cb16

Browse files
authored
Merge pull request #8675 from phuhung273/vpa-chart-admission-affinity
feat(chart): affinity, tolerations, nodeSelector for VPA Admission Controller
2 parents 71be489 + ae2e309 commit 806cb16

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The Vertical Pod Autoscaler (VPA) automatically adjusts the CPU and memory resou
2222

2323
| Key | Type | Default | Description |
2424
|-----|------|---------|-------------|
25+
| admissionController.affinity | object | `{}` | |
2526
| admissionController.enabled | bool | `true` | |
2627
| admissionController.extraArgs | list | `[]` | |
2728
| admissionController.extraEnv | list | `[]` | |
@@ -52,6 +53,7 @@ The Vertical Pod Autoscaler (VPA) automatically adjusts the CPU and memory resou
5253
| admissionController.tls.existingSecret | string | `""` | |
5354
| admissionController.tls.key | string | `""` | |
5455
| admissionController.tls.secretName | string | `"vpa-tls-certs"` | |
56+
| admissionController.tolerations | list | `[]` | |
5557
| admissionController.volumeMounts[0].mountPath | string | `"/etc/tls-certs"` | |
5658
| admissionController.volumeMounts[0].name | string | `"tls-certs"` | |
5759
| admissionController.volumeMounts[0].readOnly | bool | `true` | |

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/templates/admission-controller-deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ spec:
3535
securityContext:
3636
runAsNonRoot: true
3737
runAsUser: 65534
38+
{{- with .Values.admissionController.nodeSelector }}
39+
nodeSelector:
40+
{{- toYaml . | nindent 8 }}
41+
{{- end }}
42+
{{- with .Values.admissionController.affinity }}
43+
affinity:
44+
{{- toYaml . | nindent 8 }}
45+
{{- end }}
46+
{{- with .Values.admissionController.tolerations }}
47+
tolerations:
48+
{{- toYaml . | nindent 8 }}
49+
{{- end }}
3850
containers:
3951
- name: admission-controller
4052
image: {{ include "vertical-pod-autoscaler.admissionController.image" . }}

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ admissionController:
6868
# Node selector labels for scheduling the Admission Controller.
6969
nodeSelector: {}
7070

71+
# Affinity for pod assignment.
72+
affinity: {}
73+
74+
# List of node taints to tolerate.
75+
tolerations: []
76+
7177
tls:
7278
secretName: vpa-tls-certs
7379
caCert: ""

0 commit comments

Comments
 (0)