Skip to content

Commit 5c6f99e

Browse files
Use DNS-01 ACME solver for hosted gateway TLS
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
1 parent e1ade01 commit 5c6f99e

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

  • charts/service-gateway/templates/gateway-tls

charts/service-gateway/templates/gateway-tls/issuer.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,45 @@ spec:
3030
name: {{ include "tenant.name" . }}-gw-acme-cred
3131
solvers:
3232
# An empty 'selector' means that this solver matches all domains
33-
{{- if (eq .Values.infra.tls.acme.solver "Ingress") }}
33+
{{- if eq (dig "mode" "" (.Values.gatewayClass.annotations | default dict)) "hosted" }}
34+
- selector: {}
35+
dns01:
36+
{{- if eq .Values.infra.dns.provider "cloudflare" }}
37+
cloudflare:
38+
apiTokenSecretRef:
39+
name: {{ include "tenant.name" . }}-gw-dns-cred
40+
key: CF_API_TOKEN
41+
{{- end }}
42+
{{- if eq .Values.infra.dns.provider "route53" }}
43+
route53:
44+
region: {{ .Values.infra.dns.auth.route53.AWS_REGION }}
45+
accessKeyIDSecretRef:
46+
name: {{ include "tenant.name" . }}-gw-dns-cred
47+
key: AWS_ACCESS_KEY_ID
48+
secretAccessKeySecretRef:
49+
name: {{ include "tenant.name" . }}-gw-dns-cred
50+
key: AWS_SECRET_ACCESS_KEY
51+
{{- end }}
52+
{{- if eq .Values.infra.dns.provider "cloudDNS" }}
53+
cloudDNS:
54+
project: {{ .Values.infra.dns.auth.cloudDNS.GOOGLE_PROJECT_ID }}
55+
serviceAccountSecretRef:
56+
name: {{ include "tenant.name" . }}-gw-dns-cred
57+
key: GOOGLE_SERVICE_ACCOUNT_JSON_KEY
58+
{{- end }}
59+
{{- if eq .Values.infra.dns.provider "azureDNS" }}
60+
azureDNS:
61+
clientID: {{ .Values.infra.dns.auth.azureDNS.servicePrincipalAppID }}
62+
clientSecretSecretRef:
63+
name: {{ include "tenant.name" . }}-gw-dns-cred
64+
key: SERVICE_PRINCIPAL_PASSWORD
65+
subscriptionID: {{ .Values.infra.dns.auth.azureDNS.subscriptionID }}
66+
tenantID: {{ .Values.infra.dns.auth.azureDNS.tenantID }}
67+
resourceGroupName: {{ .Values.infra.dns.auth.azureDNS.resourceGroupName }}
68+
hostedZoneName: {{ .Values.infra.dns.auth.azureDNS.hostedZoneName }}
69+
environment: {{ .Values.infra.dns.auth.azureDNS.environment | default "AzurePublicCloud" }}
70+
{{- end }}
71+
{{- else if (eq .Values.infra.tls.acme.solver "Ingress") }}
3472
- selector: {}
3573
http01:
3674
ingress:

0 commit comments

Comments
 (0)