Skip to content

Commit

Permalink
[stable/vpa] Allow the admission controller to register itself as a w…
Browse files Browse the repository at this point in the history
…ebhook (#1427)

* [stable/vpa] allow the admission controller to register itself as a webhook

* simplify conditional

* quote bool

* Revert "quote bool"

This reverts commit 72c3b11.

* Revert "simplify conditional"

This reverts commit 8368a3a.
  • Loading branch information
jslivka authored Feb 20, 2024
1 parent 0e49d63 commit bc725b5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/vpa/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: vpa
description: A Helm chart for Kubernetes Vertical Pod Autoscaler
type: application
version: 4.4.1
version: 4.4.2
appVersion: 1.0.0
maintainers:
- name: sudermanjr
Expand Down
1 change: 1 addition & 0 deletions stable/vpa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ recommender:
| admissionController.extraArgs | object | `{}` | A key-value map of flags to pass to the admissionController |
| admissionController.generateCertificate | bool | `true` | If true and admissionController is enabled, a pre-install hook will run to create the certificate for the webhook |
| admissionController.secretName | string | `"{{ include \"vpa.fullname\" . }}-tls-secret"` | Name for the TLS secret created for the webhook. Default {{ .Release.Name }}-tls-secret |
| admissionController.registerWebhook | bool | `false` | If true, will allow the vpa admission controller to register itself as a mutating webhook |
| admissionController.certGen.image.repository | string | `"registry.k8s.io/ingress-nginx/kube-webhook-certgen"` | An image that contains certgen for creating certificates. Only used if admissionController.generateCertificate is true |
| admissionController.certGen.image.tag | string | `"v20230312-helm-chart-4.5.2-28-g66a760794"` | An image tag for the admissionController.certGen.image.repository image. Only used if admissionController.generateCertificate is true |
| admissionController.certGen.image.pullPolicy | string | `"Always"` | The pull policy for the certgen image. Recommend not changing this |
Expand Down
4 changes: 4 additions & 0 deletions stable/vpa/templates/admission-controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ spec:
image: {{ printf "%s:%s" .Values.admissionController.image.repository (.Values.admissionController.image.tag | default .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.admissionController.image.pullPolicy }}
args:
{{- if .Values.admissionController.registerWebhook }}
- --register-webhook=true
{{- else }}
- --register-webhook=false
{{- end }}
- --webhook-service={{ include "vpa.fullname" . }}-webhook
{{- if .Values.admissionController.generateCertificate }}
- --client-ca-file=/etc/tls-certs/ca
Expand Down
2 changes: 2 additions & 0 deletions stable/vpa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ admissionController:
generateCertificate: true
# admissionController.secretName -- Name for the TLS secret created for the webhook. Default {{ .Release.Name }}-tls-secret
secretName: "{{ include \"vpa.fullname\" . }}-tls-secret"
# admissionController.registerWebhook -- If true, will allow the vpa admission controller to register itself as a mutating webhook
registerWebhook: false
certGen:
image:
# admissionController.certGen.image.repository -- An image that contains certgen for creating certificates. Only used if admissionController.generateCertificate is true
Expand Down

0 comments on commit bc725b5

Please sign in to comment.