11# STACKIT Webhook Integration for Cert Manager
2+
23[ ![ GoTemplate] ( https://img.shields.io/badge/go/template-black?logo=go )] ( https://github.com/golang-standards/project-layout )
34[ ![ Go] ( https://img.shields.io/badge/go-1.21.0-blue?logo=go )] ( https://golang.org/ )
45[ ![ Helm] ( https://img.shields.io/badge/helm-3.12.3-blue?logo=helm )] ( https://helm.sh/ )
89[ ![ CI] ( https://github.com/stackitcloud/stackit-cert-manager-webhook/actions/workflows/main.yml/badge.svg )] ( https://github.com/stackitcloud/stackit-cert-manager-webhook/actions/workflows/main.yml )
910[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/stackitcloud/stackit-cert-manager-webhook )] ( https://goreportcard.com/report/github.com/stackitcloud/stackit-cert-manager-webhook )
1011
11- Facilitate a webhook integration for leveraging the STACKIT DNS alongside
12- its [ API] ( https://docs.api.stackit.cloud/documentation/dns/version/v1 ) to act as a DNS01
12+ Facilitate a webhook integration for leveraging the STACKIT DNS alongside
13+ its [ API] ( https://docs.api.stackit.cloud/documentation/dns/version/v1 ) to act as a DNS01
1314ACME Issuer with [ cert-manager] ( https://cert-manager.io/docs/ ) .
1415
1516## Installation
17+
1618``` bash
1719helm install stackit-cert-manager-webhook \
1820 --namespace cert-manager \
1921 https://github.com/stackitcloud/stackit-cert-manager-webhook/releases/download/v0.1.2/stackit-cert-manager-webhook-v0.1.2.tgz
2022```
2123
2224## Usage
25+
23261 . *** Initiation of STACKIT Authentication Token Secret:***
2427 ``` bash
2528 kubectl create secret generic stackit-cert-manager-webhook \
@@ -47,7 +50,7 @@ helm install stackit-cert-manager-webhook \
4750 }
4851 }'
4952 ```
50- You now need to adjust the deployment via helm to use the secret:
53+ You now need to adjust the deployment via helm to use the secret:
5154 ` ` ` bash
5255 helm upgrade stackit-cert-manager-webhook \
5356 --namespace cert-manager \
@@ -56,7 +59,7 @@ helm install stackit-cert-manager-webhook \
5659 ` ` `
5760
58612. *** Configuration of ClusterIssuer/Issuer:***
59- For scenarios wherein zones and record sets are encapsulated within a singular project, utilize a ClusterIssuer:
62+ For scenarios wherein zones and record sets are encapsulated within a singular project, utilize a ClusterIssuer:
6063 ` ` ` yaml
6164 apiVersion: cert-manager.io/v1
6265 kind: ClusterIssuer
@@ -77,9 +80,9 @@ For scenarios wherein zones and record sets are encapsulated within a singular p
7780 projectId: <STACKIT PROJECT ID>
7881 ` ` `
7982
80- For diverse project architectures where zones are spread across varying projects, necessitating distinct
81- authentication tokens per project, the Issuer configuration becomes pertinent. This approach inherently
82- tethers namespaces to individual projects.
83+ For diverse project architectures where zones are spread across varying projects, necessitating distinct
84+ authentication tokens per project, the Issuer configuration becomes pertinent. This approach inherently
85+ tethers namespaces to individual projects.
8386 ` ` ` bash
8487 kubectl create secret generic stackit-cert-manager-webhook \
8588 --namespace=default \
@@ -106,11 +109,11 @@ For scenarios wherein zones and record sets are encapsulated within a singular p
106109 projectId: <STACKIT PROJECT ID>
107110 authTokenSecretNamespace: default
108111 ` ` `
109- * Note:* Ensure the creation of an authentication token secret within the namespace linked to the issuer.
110- The secret must be vested with permissions to access zones in the stipulated project configuration.
112+ * Note:* Ensure the creation of an authentication token secret within the namespace linked to the issuer.
113+ The secret must be vested with permissions to access zones in the stipulated project configuration.
1111143. *** Demonstration of Ingress Integration with Wildcard SSL/TLS Certificate Generation***
112- Given the preceding configuration, it is possible to exploit the capabilities of the Issuer or ClusterIssuer to
113- dynamically produce wildcard SSL/TLS certificates in the following manner:
115+ Given the preceding configuration, it is possible to exploit the capabilities of the Issuer or ClusterIssuer to
116+ dynamically produce wildcard SSL/TLS certificates in the following manner:
114117 ` ` ` yaml
115118 apiVersion: cert-manager.io/v1
116119 kind: Certificate
@@ -154,7 +157,46 @@ dynamically produce wildcard SSL/TLS certificates in the following manner:
154157 secretName: wildcard-example-tls
155158 ` ` `
156159
160+ # # Config Options
161+
162+ The following table delineates the configuration options available for the STACKIT Cert Manager Webhook:
163+
164+ ` ` ` yaml
165+ apiVersion: cert-manager.io/v1
166+ kind: Issuer
167+ metadata:
168+ name: letsencrypt-prod
169+ namespace: default
170+ spec:
171+ acme:
172+ server: https://acme-v02.api.letsencrypt.org/directory
173+ email: example@example.com # Replace this with your email address
174+ privateKeySecretRef:
175+ name: letsencrypt-prod
176+ solvers:
177+ - dns01:
178+ webhook:
179+ solverName: stackit
180+ groupName: acme.stackit.de
181+ config:
182+ projectId: string
183+ apiBasePath: string
184+ authTokenSecretRef: string
185+ authTokenSecretKey: string
186+ authTokenSecretNamespace: string
187+ serviceAccountKeyPath: string
188+ ` ` `
189+
190+ - projectId: The unique identifier for the STACKIT project.
191+ - apiBasePath: The base path for the STACKIT DNS API. (Default: https://dns.api.stackit.cloud)
192+ - authTokenSecretRef: The reference to the secret containing the STACKIT authentication token. (Default:
193+ stackit-cert-manager-webhook)
194+ - authTokenSecretKey: The key within the secret containing the STACKIT authentication token. (Default: auth-token)
195+ - authTokenSecretNamespace: The namespace of the secret containing the STACKIT authentication token. (Default: cert-manager)
196+ - serviceAccountKeyPath: The path to the service account key file. The file must be mounted into the container.
197+
157198# # Test Procedures
199+
158200- Unit Testing:
159201 ` ` ` bash
160202 make test
@@ -171,21 +213,25 @@ dynamically produce wildcard SSL/TLS certificates in the following manner:
171213 ` ` `
172214
173215- End-to-End Testing Workflow:
174- Follow the comprehensive guide available [here](e2e_test/README.md).
216+ Follow the comprehensive guide available [here](e2e_test/README.md).
175217
176218# # Release Process Overview
177- Our release pipeline leverages goreleaser for the generation and publishing of release assets.
219+
220+ Our release pipeline leverages goreleaser for the generation and publishing of release assets.
178221This sophisticated approach ensures the streamlined delivery of:
222+
179223- Pre-compiled binaries tailored for various platforms.
180224- Docker images optimized for production readiness.
181225
182- However, one should be cognizant of the fact that goreleaser doesn' t inherently support Helm chart distributions
183- as part of its conventional workflow. Historically, the incorporation of Helm charts into our releases demanded manual
184- intervention. Post the foundational release generation via goreleaser, the Helm chart was affixed as an asset through
226+ However, one should be cognizant of the fact that goreleaser doesn' t inherently support Helm chart distributions
227+ as part of its conventional workflow. Historically, the incorporation of Helm charts into our releases demanded manual
228+ intervention. Post the foundational release generation via goreleaser, the Helm chart was affixed as an asset through
185229manual processes.
186230For those interested in the Helm chart creation mechanics, the process was facilitated via the command:
231+
187232```bash
188233helm package deploy/stackit
189234```
190- To release a new version of the Helm chart, one must meticulously update the version delineation in the
235+
236+ To release a new version of the Helm chart, one must meticulously update the version delineation in the
191237[Chart.yaml](./deploy/stackit/Chart.yaml). Post this modification, initiate a new release to encompass these changes.
0 commit comments