kelseyhightower/kube-cert-manager

json: cannot unmarshal object into Go value of type string

mdbishop opened this issue · 1 comments

After installing and getting up to the point where you'd submit a certificate request for processing, all works to plan. However once I submit a cert request, not so much. The kube-cert-manager log and sequence of events follows (with some minor redaction):

2016/10/27 01:02:01 Starting Kubernetes Certificate Controller...
2016/10/27 01:02:01 Kubernetes Certificate Controller started successfully.
2016/10/27 01:02:01 Watching for certificate events.
2016/10/27 01:02:01 Starting reconciliation loop.
< -- kubectl apply -f certificates/test-cert-com.yaml --->
###########  test-cert-com.yaml ##############
apiVersion: stable.hightower.com/v1
kind: Certificate
metadata:
    name: test-dot-myco-dot-com
spec:
    domain: test.myco.com
    email: mbishop@myco.com
    provider: googledns
    secret: google-dns-sa
    secretKey: service-account.json
######### end of yaml #########################
2016/10/27 01:05:46 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:46 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:46 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:46 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:46 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:47 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:47 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:47 json: cannot unmarshal object into Go value of type string
2016/10/27 01:05:47 json: cannot unmarshal object into Go value of type string
<-- kubectl delete -f certificates/test-cert-com.yaml -->
error messages stop

I've ensured the service account JSON as well as the yaml files pass validation and have - especially on the service account, made sure there were no errant spaces or newlines that may be throwing it off. Unclear is whether the cert controller doesn't like the SA or the Request (or both) so any thoughts would be appreciated.

Cheers and thanks for pulling this together!

This is fixed in master. It was an issue with trying to unmarshal metadata as a string.