Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPA Certificate validity duration #161

Closed
qqmelanie opened this issue Apr 28, 2022 · 2 comments
Closed

VPA Certificate validity duration #161

qqmelanie opened this issue Apr 28, 2022 · 2 comments

Comments

@qqmelanie
Copy link

Hello,
First of all, thank you for your work!
We're using VPA chart and it would be very useful to have ability to set certificate validity duration.

At the moment certificates are valid for 365 days and it's an issue for long-lived clusters, even though extended validity can be a security concern.
We would love to submit a PR if you're interested in such changes.

Thanks.

{{- $ca := genCA (include "vertical-pod-autoscaler.admissionController.fullname" .) 365 }}
# {{- $cn := printf "%s.%s.svc" (include "vertical-pod-autoscaler.admissionController.fullname" .) .Release.Namespace }}
{{- $cn := printf "%s.%s.svc" "vpa-webhook" .Release.Namespace }}
{{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }}

@sebastien-prudhomme
Copy link
Contributor

Hi @qqmelanie, in these charts I try to copy what Bitnami is doing in their charts: https://github.com/bitnami/charts/tree/master/bitnami

Each time they need certificates they use a fixed value of 365 days for the default auto-signed certificate, that's the reason I also use 365 days.

For your need, what you can do is:

  • generating your own certificates (CA and admission controller certificate) and configure admissionController.tls.* parameters (in PEM format)
  • generating your own secret outside of the chart and use admissionController.tls.existingSecret. You can use a tool such as cert-manager if you have yet this tool: https://cert-manager.io/

The only requirement is to have a Common Name in the certificate with the admission controller service name : vpa-webhook.<namespace>.svc

@qqmelanie
Copy link
Author

Hey! Got it, thanks. cert-manager is a great tool, but I thought there can be an easier way.
Anyway, thanks, I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants