Pārlūkot izejas kodu

feat(chart): add support for revisionHistoryLimit on the cert (#4292)

* feat(chart): add support for revisionHistoryLimit on the cert

Certificates support setting revisionHistoryLimit on a per cert basis to prevent
the sprawl of certificateRequests. This functions similarly to
revisionHistoryLimit on Deployments

Signed-off-by: Hans Knecht <hans@anomalo.com>

* chore: make helm.test.update

Signed-off-by: Hans Knecht <hans@anomalo.com>

---------

Signed-off-by: Hans Knecht <hans@anomalo.com>
Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Hans Knecht 1 gadu atpakaļ
vecāks
revīzija
926eab7b51

+ 3 - 0
deploy/charts/external-secrets/templates/webhook-certificate.yaml

@@ -26,5 +26,8 @@ spec:
   {{- with .Values.webhook.certManager.cert.renewBefore }}
   renewBefore: {{ . | quote }}
   {{- end }}
+  {{- with .Values.webhook.certManager.cert.revisionHistoryLimit }}
+  revisionHistoryLimit: {{ . | quote }}
+  {{- end }}
   secretName: {{ include "external-secrets.fullname" . }}-webhook
 {{- end }}

+ 4 - 0
deploy/charts/external-secrets/values.yaml

@@ -315,6 +315,10 @@ webhook:
       # https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec
       # One year by default.
       duration: "8760h"
+      # -- Set the revisionHistoryLimit on the Certificate. See
+      # https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec
+      # Defaults to nil.
+      revisionHistoryLimit: ""
       # -- How long before the currently issued certificate’s expiry
       # cert-manager should renew the certificate. See
       # https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec