From f5d062650bb914879e06a1224f756ff61fda6b1e Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Wed, 10 Apr 2024 10:38:17 +0200 Subject: [PATCH] renamed to certmanager --- infrastructure/07-certmanager/dns-issuer.yaml | 55 +++++++++++++++++++ .../07-certmanager/ionos-secret-sealed.yaml | 29 ++++++++++ .../07-certmanager/kustomization.yaml | 18 ++++++ infrastructure/07-certmanager/namespace.yaml | 4 ++ infrastructure/07-certmanager/values.yaml | 5 ++ 5 files changed, 111 insertions(+) create mode 100644 infrastructure/07-certmanager/dns-issuer.yaml create mode 100644 infrastructure/07-certmanager/ionos-secret-sealed.yaml create mode 100644 infrastructure/07-certmanager/kustomization.yaml create mode 100644 infrastructure/07-certmanager/namespace.yaml create mode 100644 infrastructure/07-certmanager/values.yaml diff --git a/infrastructure/07-certmanager/dns-issuer.yaml b/infrastructure/07-certmanager/dns-issuer.yaml new file mode 100644 index 0000000..17180c2 --- /dev/null +++ b/infrastructure/07-certmanager/dns-issuer.yaml @@ -0,0 +1,55 @@ +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-staging +spec: + acme: + # The ACME server URL + server: https://acme-staging-v02.api.letsencrypt.org/directory + # Email address used for ACME registration + email: steffen.illium@gmail.com + # Name of a secret used to store the ACME account private key + privateKeySecretRef: + name: letsencrypt-ionos-staging-key + # Enable the dns01 challenge provider + solvers: + - dns01: + webhook: + groupName: acme.steffenillium.de + solverName: ionos + config: + apiUrl: https://api.hosting.ionos.com/dns/v1 + publicKeySecretRef: + key: PREFIX + name: ionos-secret + secretKeySecretRef: + key: SECRET + name: ionos-secret +--- +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-prod +spec: + acme: + # The ACME server URL + server: https://acme-v02.api.letsencrypt.org/ + # Email address used for ACME registration + email: steffen.illium@gmail.com + # Name of a secret used to store the ACME account private key + privateKeySecretRef: + name: letsencrypt-ionos-key + # Enable the dns01 challenge provider + solvers: + - dns01: + webhook: + groupName: acme.steffenillium.de + solverName: ionos + config: + apiUrl: https://api.hosting.ionos.com/dns/v1 + publicKeySecretRef: + key: PREFIX + name: ionos-secret + secretKeySecretRef: + key: SECRET + name: ionos-secret \ No newline at end of file diff --git a/infrastructure/07-certmanager/ionos-secret-sealed.yaml b/infrastructure/07-certmanager/ionos-secret-sealed.yaml new file mode 100644 index 0000000..e1c8db3 --- /dev/null +++ b/infrastructure/07-certmanager/ionos-secret-sealed.yaml @@ -0,0 +1,29 @@ +{ + "kind": "SealedSecret", + "apiVersion": "bitnami.com/v1alpha1", + "metadata": { + "name": "ionos-secret", + "namespace": "cert-manager", + "creationTimestamp": null, + "annotations": { + "sealedsecrets.bitnami.com/namespace-wide": "true" + } + }, + "spec": { + "template": { + "metadata": { + "name": "ionos-secret", + "namespace": "cert-manager", + "creationTimestamp": null, + "annotations": { + "sealedsecrets.bitnami.com/namespace-wide": "true" + } + }, + "type": "Opaque" + }, + "encryptedData": { + "PREFIX": "AgAq4okbPaF6zKP44PpXdhvMkx5Ndxcozz0l594nDxkydUB5uliX1s3gX/Z1YgW9k5Ula9x/Ypx/cW9SKOZ1W601VFgkaxe6ocaRWccZLeJmdj7c5h4OqmvDIRvscSC+Z4vts7XzSor4TKBLRD3rcWbthoXMyabMUYMNjETB8m+lEU1qa/O6CP9eHicC1PlAccWvzjwK7zImooo+od3436go8kLJNI9Sewmywmq09G39tuiCV59kzIZeXdNcwuxkxe49lZfbsFxcLkfl82ay1I68zZWQ8C2j3U6mxgh81CIkmswYk6qbnYCaZsLHp2vzJ05YGD/2Odvvlc0OA2EGCpomBwHEDtUKCCdyH+/3HeBspi3X0nKuLuWR0zX8FlOXoj0WPJMfWAMVBHDrqRJcC5NvT3xhx/L4YKUxIp+424CvxFnUT1lox3Dw1ssDPG1LcKZKn7OOEmkUOSVHkysMkKpmR6PKEAnWU6SIntoWD86Grw91Fnw6GOxPgyOsPcxsL+p/5meqtJKMLKQoRMq+NIAwmaXnoOhc30wjfQjqu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b/infrastructure/07-certmanager/kustomization.yaml new file mode 100644 index 0000000..98f4b0d --- /dev/null +++ b/infrastructure/07-certmanager/kustomization.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: cert-manager + +resources: + - dns-issuer.yaml + - https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.crds.yaml + - ionos-secret-sealed.yaml + - namespace.yaml + +helmCharts: +- name: cert-manager + includeCRDs: false + version: 1.14.4 + releaseName: "cert-manager" + repo: https://charts.jetstack.io + valuesFile: values.yaml diff --git a/infrastructure/07-certmanager/namespace.yaml b/infrastructure/07-certmanager/namespace.yaml new file mode 100644 index 0000000..661039b --- /dev/null +++ b/infrastructure/07-certmanager/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: cert-manager \ No newline at end of file diff --git a/infrastructure/07-certmanager/values.yaml b/infrastructure/07-certmanager/values.yaml new file mode 100644 index 0000000..2e7e71d --- /dev/null +++ b/infrastructure/07-certmanager/values.yaml @@ -0,0 +1,5 @@ +webhook: + securePort: 10260 +global: + leaderElection: + namespace: cert-manager \ No newline at end of file