We have a number of checks that operate on admission control webhook configuration. Older clusters support only v1beta1 of admission control, while newer clusters support v1. Currently clusterlint fails to run on these older clusters because we can't fetch v1 admission control objects from them.
This PR makes two changes to fix this:
When listing objects, ignore "not found" errors, which mean the cluster doesn't support the resource we're trying to list.
Duplicate our existing admission control webhook checks for v1beta1, so that older clusters get the same checks as newer clusters.
While we're here, enhance the errors we return when listing objects fails so that we can tell which resource we failed to list.
We have a number of checks that operate on admission control webhook configuration. Older clusters support only v1beta1 of admission control, while newer clusters support v1. Currently clusterlint fails to run on these older clusters because we can't fetch v1 admission control objects from them.
This PR makes two changes to fix this:
While we're here, enhance the errors we return when listing objects fails so that we can tell which resource we failed to list.