Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kubernetes): Fix handling of kinds not available on the server (#…
…4010) kubectl auth can-i returns 'yes' for kinds that you have permission for, even if they don't exist on the cluster. The change to defer kind checking removed filtering on the result of kubectl api-resources (mistakenly thinking this filtering was only for performance). This means that clouddriver is trying to cache unreadable kinds if they are unreadable because they don't exist. Fix this by reverting to the old behavior of just trying to call 'list' on a resource to determine if it's readable. (This is probably not any more expensive than doing an api-resources call every time we check if a kind is readable and is simpler. It also reproduces exactly what the caching agent is doing so should avoid edge cases like the bug here.)
- Loading branch information