cert-manager-webhook-example/deploy/dnsimple/templates/production.cluster-issuer.yaml
Michael Lescisin c1db14cfbf
Add the ability to use a DNSimple User API token (#26)
* Allow for the DNSimple account ID to be specified via the dnssimple.accountID value

* Allow for the DNSimple account ID to be manually specified via the DNSIMPLE_ACCOUNT_ID environment variable

Fix incorrect variable specification in main.go

* Allow for the DNSimple account ID to be manually specified via the DNSIMPLE_ACCOUNT_ID environment variable

Fix missing return of nil in main.go

* Fix incorrect double-declaration of env section in deployment.yaml

* Fix incorrect logic when handling DNSIMPLE_ACCOUNT_ID environment variable

* The client.Zones.GetZone check isn't needed in the getExistingRecord function and it prevents User API tokens from being used for authentication - only Account API tokens would work

* Incorporate changes from https://github.com/puzzle/cert-manager-webhook-dnsimple/pull/29 so that the DNSimple accountID may be obtained from the Issuer config if a DNSimple User API token is being used

* Remove unused variable DnsimpleAccountId

* Fix deploy/dnsimple/templates/deployment.yaml - DNSIMPLE_ACCOUNT_ID environment variable doesn't do anything anymore so we can delete it

* Pass the .Values.dnsimple.accountID value down to the staging and production ClusterIssuer configs

* Update README.md with documentation on the dnsimple.accountID parameter

* The ClusterIssuer configs must quote the accountID value so that it is interpreted as a string and not as a number

* Fix indentation level of imagePullSecret in deployment.yaml
2024-04-22 09:14:28 +02:00

27 lines
904 B
YAML

{{- if .Values.clusterIssuer.production.enabled -}}
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: {{ include "dnsimple-webhook.fullname" . }}-production
labels:
app: {{ include "dnsimple-webhook.name" . }}
chart: {{ include "dnsimple-webhook.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
acme:
email: {{ .Values.clusterIssuer.email }}
privateKeySecretRef:
name: {{ include "dnsimple-webhook.fullname" . }}-production
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- dns01:
webhook:
config:
tokenSecretRef:
key: token
name: {{ include "dnsimple-webhook.tokenSecretName" . }}
accountID: {{ .Values.dnsimple.accountID | quote }}
groupName: {{ .Values.groupName }}
solverName: dnsimple
{{- end -}}