From a265ee04af9b21379c4f33cf8838e579f71d99d6 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sun, 1 Nov 2026 20:33:36 +0100 Subject: Implement Hostinger DNS webhook --- deploy/example-webhook/Chart.yaml | 4 ++-- deploy/example-webhook/templates/rbac.yaml | 26 ++++++++++++++++++++++++++ deploy/example-webhook/values.yaml | 5 ++++- 3 files changed, 32 insertions(+), 3 deletions(-) (limited to 'deploy') diff --git a/deploy/example-webhook/Chart.yaml b/deploy/example-webhook/Chart.yaml index 77c6ead..fc4e447 100644 --- a/deploy/example-webhook/Chart.yaml +++ b/deploy/example-webhook/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" -description: A Helm chart for Kubernetes -name: example-webhook +description: cert-manager dns01 webhook for hostinger +name: cert-manager-webhook-hostinger version: 0.1.0 diff --git a/deploy/example-webhook/templates/rbac.yaml b/deploy/example-webhook/templates/rbac.yaml index 605fcf5..f952fd1 100644 --- a/deploy/example-webhook/templates/rbac.yaml +++ b/deploy/example-webhook/templates/rbac.yaml @@ -89,3 +89,29 @@ subjects: kind: ServiceAccount name: {{ .Values.certManager.serviceAccountName }} namespace: {{ .Values.certManager.namespace }} +--- +# Allow reading only the configured Hostinger token Secret. +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "example-webhook.fullname" . }}:hostinger-token + namespace: {{ .Values.certManager.namespace }} +rules: + - apiGroups: [""] + resources: ["secrets"] + resourceNames: [{{ .Values.apiKeySecretName | quote }}] + verbs: ["get"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "example-webhook.fullname" . }}:hostinger-token + namespace: {{ .Values.certManager.namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "example-webhook.fullname" . }}:hostinger-token +subjects: + - kind: ServiceAccount + name: {{ include "example-webhook.fullname" . }} + namespace: {{ .Release.Namespace }} diff --git a/deploy/example-webhook/values.yaml b/deploy/example-webhook/values.yaml index 9423bd4..4826719 100644 --- a/deploy/example-webhook/values.yaml +++ b/deploy/example-webhook/values.yaml @@ -8,12 +8,15 @@ # The name will need to be referenced in each Issuer's `webhook` stanza to # inform cert-manager of where to send ChallengePayload resources in order to # solve the DNS01 challenge. -groupName: acme.mycompany.com +groupName: cert-manager-webhook-hostinger.jnsn.dev certManager: namespace: cert-manager serviceAccountName: cert-manager +# Token Secret in certManager.namespace; must match config.apiKeySecretRef.name. +apiKeySecretName: hostinger-api-token + image: repository: mycompany/webhook-image tag: latest -- cgit v1.2.3