Closed cmoulliard closed 2 years ago
Last step of the main_test.go fails due to I suspect a finalizer issue using locally the kube api server.
main_test.go
I0125 11:38:46.350034 95340 round_trippers.go:435] curl -v -XGET -H "User-Agent: godaddy-webhook.test/v0.0.0 (darwin/amd64) kubernetes/$Format" -H "Accept: application/json, */*" 'https://127.0.0.1:62284/api/v1/namespaces/extended-supports-multiple-same-domain/secrets/godaddy-credentials' I0125 11:38:46.351535 95340 round_trippers.go:454] GET https://127.0.0.1:62284/api/v1/namespaces/extended-supports-multiple-same-domain/secrets/godaddy-credentials 200 OK in 1 milliseconds I0125 11:38:46.351549 95340 round_trippers.go:460] Response Headers: I0125 11:38:46.351554 95340 round_trippers.go:463] X-Kubernetes-Pf-Flowschema-Uid: a9ac9ee9-1e97-457e-be95-27ac0173816a I0125 11:38:46.351558 95340 round_trippers.go:463] X-Kubernetes-Pf-Prioritylevel-Uid: 500aaf84-6569-4031-8c89-4f787a129f13 I0125 11:38:46.351562 95340 round_trippers.go:463] Content-Length: 1005 I0125 11:38:46.351568 95340 round_trippers.go:463] Date: Tue, 25 Jan 2022 10:38:46 GMT I0125 11:38:46.351572 95340 round_trippers.go:463] Audit-Id: 49dac0fc-b97e-4265-8130-2d03c882c913 I0125 11:38:46.351575 95340 round_trippers.go:463] Cache-Control: no-cache, private I0125 11:38:46.351579 95340 round_trippers.go:463] Content-Type: application/json I0125 11:38:46.351595 95340 request.go:1181] Response Body: {"kind":"Secret","apiVersion":"v1","metadata":{"name":"godaddy-credentials","namespace":"extended-supports-multiple-same-domain","uid":"44d8dc3c-5a78-4d4f-8f9f-e28219d033dc","resourceVersion":"195","creationTimestamp":"2022-01-25T10:36:44Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Secret\",\"metadata\":{\"annotations\":{},\"name\":\"godaddy-credentials\",\"namespace\":\"extended-supports-multiple-same-domain\"},\"stringData\":{\"token\":\"dLDD4PTjgyQb_jKqVef5UCxHpvBczGtDHq:jL44TPNVS7RRMPQmGgTps\"},\"type\":\"Opaque\"}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion":"v1","time":"2022-01-25T10:36:44Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:token":{}},"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:type":{}}}]},"data":{"token":"ZExERDRQVGpneVFiX2pLcVZlZjVVQ3hIcHZCY3pHdERIcTpqTDQ0VFBOVlM3UlJNUFFtR2dUcHM="},"type":"Opaque"} I0125 11:38:46.351667 95340 wait.go:329] Returning cached zone record "snowdrop.me." for fqdn "snowdrop.me." I0125 11:38:46.675211 95340 request.go:1181] Request Body: {"kind":"DeleteOptions","apiVersion":"v1"} I0125 11:38:46.675252 95340 round_trippers.go:435] curl -v -XDELETE -H "Accept: application/json, */*" -H "Content-Type: application/json" -H "User-Agent: godaddy-webhook.test/v0.0.0 (darwin/amd64) kubernetes/$Format" 'https://127.0.0.1:62284/api/v1/namespaces/extended-supports-multiple-same-domain' I0125 11:38:46.680062 95340 round_trippers.go:454] DELETE https://127.0.0.1:62284/api/v1/namespaces/extended-supports-multiple-same-domain 200 OK in 4 milliseconds I0125 11:38:46.680087 95340 round_trippers.go:460] Response Headers: I0125 11:38:46.680092 95340 round_trippers.go:463] X-Kubernetes-Pf-Flowschema-Uid: a9ac9ee9-1e97-457e-be95-27ac0173816a I0125 11:38:46.680096 95340 round_trippers.go:463] X-Kubernetes-Pf-Prioritylevel-Uid: 500aaf84-6569-4031-8c89-4f787a129f13 I0125 11:38:46.680099 95340 round_trippers.go:463] Content-Length: 636 I0125 11:38:46.680102 95340 round_trippers.go:463] Date: Tue, 25 Jan 2022 10:38:46 GMT I0125 11:38:46.680105 95340 round_trippers.go:463] Audit-Id: ce4fe09a-9b0a-45a1-a988-d467e5b8b3c7 I0125 11:38:46.680109 95340 round_trippers.go:463] Cache-Control: no-cache, private I0125 11:38:46.680112 95340 round_trippers.go:463] Content-Type: application/json I0125 11:38:46.680125 95340 request.go:1181] Response Body: {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"extended-supports-multiple-same-domain","uid":"3d5c7afb-911a-4a12-977d-253c9b0ac9e4","resourceVersion":"208","creationTimestamp":"2022-01-25T10:36:43Z","deletionTimestamp":"2022-01-25T10:38:46Z","labels":{"kubernetes.io/metadata.name":"extended-supports-multiple-same-domain"},"managedFields":[{"manager":"godaddy-webhook.test","operation":"Update","apiVersion":"v1","time":"2022-01-25T10:36:43Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kubernetes.io/metadata.name":{}}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}} --- FAIL: TestRunsSuite (170.27s) --- FAIL: TestRunsSuite/Conformance (162.21s) --- PASS: TestRunsSuite/Conformance/Basic (25.34s) --- PASS: TestRunsSuite/Conformance/Basic/PresentRecord (25.34s) --- FAIL: TestRunsSuite/Conformance/Extended (123.66s) --- FAIL: TestRunsSuite/Conformance/Extended/DeletingOneRecordRetainsOthers (123.66s) FAIL FAIL github.com/snowdrop/godaddy-webhook 170.770s FAIL
Fixed by adding the challengeKey as data content to the txt record created. See commit 032cb85
challengeKey
txt record
Issue
Last step of the
main_test.go
fails due to I suspect a finalizer issue using locally the kube api server.