Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve check for existing resource GVK #2418

Merged
merged 1 commit into from
May 18, 2023

Commits on May 18, 2023

  1. Improve check for existing resource GVK

    Part of the provider's preview and update logic involves checking whether a given GroupVersionKind (GVK) is registered with the Kubernetes cluster. A previous version of this check was implemented as an anonymous function in the provider's `Check` method. This implementation used a set to cache results of the check, but the cache was not saved between invocations, so it was adding unneccesary overhead to the check.
    
    This change reimplements the GVK check as a reusable method, and simplifies the checking logic. We can implement a cache later if needed, but this should already be an improvement over the previous implementation.
    lblackstone committed May 18, 2023
    Configuration menu
    Copy the full SHA
    49d6a93 View commit details
    Browse the repository at this point in the history