exoscale / cert-manager-webhook-exoscale

A cert-manager webhook for creating an ACME DNS01 solver webhook for Exoscale
Apache License 2.0
3 stars 3 forks source link

First implementation #1

Closed kobajagi closed 1 year ago

kobajagi commented 2 years ago

This PR adds first cert-manager webhook implementation for Exoscale. See README.md for details.

There is no build system yet, Github action will be configured in the separate PR.

DNS01 provider conformance testing suite report:

$  TEST_ZONE_NAME=cert-manager-webhook-test.jns.vc. make test  
TEST_ZONE_NAME=cert-manager-webhook-test.jns.vc. go test -v .
=== RUN   TestRunsSuite
2022/08/24 17:40:39 call function Initialize
=== RUN   TestRunsSuite/Basic
=== RUN   TestRunsSuite/Basic/PresentRecord
    suite.go:37: Calling Present with ChallengeRequest: &v1alpha1.ChallengeRequest{UID:"", Action:"", Type:"", DNSName:"example.com", Key:"123d==", ResourceNamespace:"basic-present-record", ResolvedFQDN:"cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.", ResolvedZone:"cert-manager-webhook-test.jns.vc.", AllowAmbientCredentials:false, Config:(*v1.JSON)(0xc000393cf8)}
2022/08/24 17:40:40 call function Present: namespace=basic-present-record, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:40:40 found client credentials in environment, ignoring config
2022/08/24 17:40:52 call function CleanUp: namespace=basic-present-record, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:40:52 found client credentials in environment, ignoring config
2022/08/24 17:40:59 call function CleanUp: namespace=basic-present-record, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:40:59 found client credentials in environment, ignoring config
2022/08/24 17:41:00 domain record "cert-manager-dns01-tests" not found, nothing to do
2022/08/24 17:41:05 call function Initialize
=== RUN   TestRunsSuite/Extended
=== RUN   TestRunsSuite/Extended/DeletingOneRecordRetainsOthers
2022/08/24 17:41:06 call function Present: namespace=extended-supports-multiple-same-domain, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:41:06 found client credentials in environment, ignoring config
2022/08/24 17:41:11 call function Present: namespace=extended-supports-multiple-same-domain, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:41:11 found client credentials in environment, ignoring config
2022/08/24 17:41:54 call function CleanUp: namespace=extended-supports-multiple-same-domain, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:41:54 found client credentials in environment, ignoring config
2022/08/24 17:42:02 call function CleanUp: namespace=extended-supports-multiple-same-domain, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:42:02 found client credentials in environment, ignoring config
2022/08/24 17:42:03 domain record "cert-manager-dns01-tests" not found, nothing to do
2022/08/24 17:42:03 call function CleanUp: namespace=extended-supports-multiple-same-domain, zone=cert-manager-webhook-test.jns.vc., fqdn=cert-manager-dns01-tests.cert-manager-webhook-test.jns.vc.
2022/08/24 17:42:03 found client credentials in environment, ignoring config
--- PASS: TestRunsSuite (92.11s)
    --- PASS: TestRunsSuite/Basic (21.00s)
        --- PASS: TestRunsSuite/Basic/PresentRecord (21.00s)
    --- PASS: TestRunsSuite/Extended (62.41s)
        --- PASS: TestRunsSuite/Extended/DeletingOneRecordRetainsOthers (62.41s)
PASS
ok      github.com/exoscale/cert-manager-webhook-exoscale       92.134s
shortcut-integration[bot] commented 2 years ago

This pull request has been linked to Shortcut Story #44036: cert-manager webhook support for Exoscale DNS.