kube-cert-manager icon indicating copy to clipboard operation
kube-cert-manager copied to clipboard

Add better error handling for getting all ingresses, secrets, certificates

Open whereisaaron opened this issue 8 years ago • 2 comments
trafficstars

While establishing RBAC permissions for kube-cert-manager, it was running without permissions to do the things it needs. For many requests it recognized the permission problem and logged something sensible e.g:

2017/01/14 02:26:01 unexpected HTTP status code while creating event: 403

However for other bulk operations, it appears not to recognize the error, instead trying to parse the failed response. This seemed to apply to fetching lists of ingresses, secrets, and certificates. I assume it got back a 200 response that said "Found no resources" or similar, since it always seems to start with 'F'!

2017/01/14 01:52:04 Error while synchronizing certificates during refresh: Error while fetching certificate list: invalid character 'F' looking for beginning of value
2017/01/14 02:16:18 Error while synchronizing ingresses during refresh: Error while fetching ingress list: invalid character 'F' looking for beginning of value
2017/01/14 02:16:18 Error cleaning up secrets: Error while fetching secret list: invalid character 'F' looking for beginning of value

I think the way to recreate this is to allow access to all nonResourceURLs but not allow access to any resources.

whereisaaron avatar Jan 14 '17 04:01 whereisaaron

This seems a legit issue and will need a fix

luna-duclos avatar Jan 14 '17 08:01 luna-duclos

Scarcely urgent though, so file it under 'one day' 😏

whereisaaron avatar Jan 14 '17 16:01 whereisaaron