mirror of
https://github.com/cert-manager/webhook-example.git
synced 2026-03-16 18:02:51 +01:00
Apply review feedback: fix variable shadowing, use TEST_ZONE_NAME env var, fix README typos and solverName
Co-authored-by: pr0ton11 <4889380+pr0ton11@users.noreply.github.com>
This commit is contained in:
parent
4900f0651f
commit
bb6c67c8ec
2 changed files with 13 additions and 8 deletions
10
README.md
10
README.md
|
|
@ -9,10 +9,10 @@
|
||||||
This solver can be used with [desec.io](https://desec.io) DNS API. The documentation of the API can be found [here](https://desec.readthedocs.io/en/latest/)
|
This solver can be used with [desec.io](https://desec.io) DNS API. The documentation of the API can be found [here](https://desec.readthedocs.io/en/latest/)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
- [go](https://golang.org) => 1.26.0
|
- [go](https://golang.org) >= 1.26.0
|
||||||
- [helm](https://helm.sh/) >= v3.0.0
|
- [helm](https://helm.sh/) >= v3.0.0
|
||||||
- [kuberentes](https://kubernetes.io/) => 1.25.0
|
- [kubernetes](https://kubernetes.io/) >= 1.25.0
|
||||||
- [cert-manager](https://cert-manager.io/) => 1.19.0
|
- [cert-manager](https://cert-manager.io/) >= 1.19.0
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ spec:
|
||||||
key: token
|
key: token
|
||||||
name: desec-io-token
|
name: desec-io-token
|
||||||
groupName: acme.pr0ton11.github.com
|
groupName: acme.pr0ton11.github.com
|
||||||
solverName: desec
|
solverName: deSEC
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create a manual certificate
|
## Create a manual certificate
|
||||||
|
|
@ -150,7 +150,7 @@ data:
|
||||||
type: Opaque
|
type: Opaque
|
||||||
```
|
```
|
||||||
|
|
||||||
Define a **TEST_ZONE_NAME** matching to your authenticaton creditials.
|
Define a **TEST_ZONE_NAME** matching to your authentication credentials.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ TEST_ZONE_NAME=example.com. make test
|
$ TEST_ZONE_NAME=example.com. make test
|
||||||
|
|
|
||||||
11
main_test.go
11
main_test.go
|
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
acmetest "github.com/cert-manager/cert-manager/test/acme"
|
acmetest "github.com/cert-manager/cert-manager/test/acme"
|
||||||
|
|
@ -21,9 +22,13 @@ func TestRunsSuite(t *testing.T) {
|
||||||
// acmetest.SetManifestPath("testdata/my-custom-solver"),
|
// acmetest.SetManifestPath("testdata/my-custom-solver"),
|
||||||
// acmetest.SetBinariesPath("_test/kubebuilder/bin"),
|
// acmetest.SetBinariesPath("_test/kubebuilder/bin"),
|
||||||
//)
|
//)
|
||||||
solver := &solver.DeSECDNSProviderSolver{}
|
desecSolver := &solver.DeSECDNSProviderSolver{}
|
||||||
fixture := acmetest.NewFixture(solver,
|
zoneName := os.Getenv("TEST_ZONE_NAME")
|
||||||
acmetest.SetResolvedZone("example.com."),
|
if zoneName == "" {
|
||||||
|
t.Skip("TEST_ZONE_NAME not set")
|
||||||
|
}
|
||||||
|
fixture := acmetest.NewFixture(desecSolver,
|
||||||
|
acmetest.SetResolvedZone(zoneName),
|
||||||
acmetest.SetManifestPath("testdata/desec"),
|
acmetest.SetManifestPath("testdata/desec"),
|
||||||
acmetest.SetDNSServer("127.0.0.1:59351"),
|
acmetest.SetDNSServer("127.0.0.1:59351"),
|
||||||
acmetest.SetUseAuthoritative(false),
|
acmetest.SetUseAuthoritative(false),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue