mirror of
https://github.com/cert-manager/webhook-example.git
synced 2025-07-01 22:35:49 +02:00

* 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
79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
apiVersion: apps/v1
|
|
{{- else -}}
|
|
apiVersion: extensions/v1beta1
|
|
{{- end }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "dnsimple-webhook.fullname" . }}
|
|
labels:
|
|
app: {{ include "dnsimple-webhook.name" . }}
|
|
chart: {{ include "dnsimple-webhook.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "dnsimple-webhook.name" . }}
|
|
release: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ include "dnsimple-webhook.name" . }}
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
serviceAccountName: {{ include "dnsimple-webhook.fullname" . }}
|
|
{{- if .Values.image.pullSecret }}
|
|
imagePullSecrets:
|
|
- name: {{ .Values.image.pullSecret }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
args:
|
|
- --tls-cert-file=/tls/tls.crt
|
|
- --tls-private-key-file=/tls/tls.key
|
|
{{- if .Values.logLevel }}
|
|
- --v={{ .Values.logLevel }}
|
|
{{- end }}
|
|
env:
|
|
- name: GROUP_NAME
|
|
value: {{ .Values.groupName | quote }}
|
|
ports:
|
|
- name: https
|
|
containerPort: 443
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
scheme: HTTPS
|
|
path: /healthz
|
|
port: https
|
|
readinessProbe:
|
|
httpGet:
|
|
scheme: HTTPS
|
|
path: /healthz
|
|
port: https
|
|
volumeMounts:
|
|
- name: certs
|
|
mountPath: /tls
|
|
readOnly: true
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
volumes:
|
|
- name: certs
|
|
secret:
|
|
secretName: {{ include "dnsimple-webhook.servingCertificate" . }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|