Skip to content

Commit 2f77ec1

Browse files
committed
Make it possible to provide a custom issuer for the certificate
1 parent be5ec5b commit 2f77ec1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

helm/aws-load-balancer-controller/templates/webhook.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ spec:
235235
- {{ template "aws-load-balancer-controller.webhookService" . }}.{{ .Release.Namespace }}.svc.{{ .Values.cluster.dnsDomain }}
236236
issuerRef:
237237
kind: Issuer
238-
name: {{ template "aws-load-balancer-controller.namePrefix" . }}-selfsigned-issuer
238+
name: {{ default (printf "%s-selfsigned-issuer" (include "aws-load-balancer-controller.namePrefix" .)) .Values.certManager.existingIssuerName }}
239239
secretName: {{ template "aws-load-balancer-controller.webhookCertSecret" . }}
240240
{{- with .Values.certManager -}}
241241
{{ if .duration }}
@@ -246,6 +246,7 @@ spec:
246246
{{- end }}
247247
{{- end }}
248248
---
249+
{{- if not $.Values.certManager.existingIssuerName }}
249250
apiVersion: cert-manager.io/v1
250251
kind: Issuer
251252
metadata:
@@ -256,3 +257,4 @@ metadata:
256257
spec:
257258
selfSigned: {}
258259
{{- end }}
260+
{{- end }}

helm/aws-load-balancer-controller/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ enableCertManager: false
119119
certManager:
120120
duration:
121121
renewBefore:
122+
# name of the existing issuer to use for certificate requests
123+
# when set, the controller will not create a self-signed issuer
124+
existingIssuerName:
122125

123126
# The name of the Kubernetes cluster. A non-empty value is required
124127
clusterName:

0 commit comments

Comments
 (0)