Skip to content

Conversation

@moiseenkov
Copy link
Contributor

In order to reduce code duplication and high complexity of the implementation, GKE hooks were refactored in this PR:

  1. Existing GKEHook and GKEAsyncHook provide interface to GKE API remain unchanged.
  2. The new GKEKubernetesHook(GoogleBaseHook, KubernetesHook) was introduced as a replacement for redundant hooks that used to contain duplicated methods that now are simply inherited from GoogleBaseHook and KubernetesHook:
  • GKEDeploymentHook (deprecated)
  • GKECustomResourceHook (deprecated)
  • GKEPodHook (deprecated)
  • GKEJobHook (deprecated)
  1. By following the same pattern, the new GKEKubernetesAsyncHook(GoogleBaseAsyncHook, AsyncKubernetesHook) was introduced as a replacement for redundant hooks that used to contain duplicated methods that now are simply inherited from GoogleBaseAsyncHook and AsyncKubernetesHook:
  • GKEPodAsyncHook (deprecated)
  1. New hooks (GKEKubernetesHook, GKEKubernetesAsyncHook) provide access to the standard Kubernetes API with a GKE authentication.
  2. Slightly adjusted system tests (they are all green now).
    system tests
  3. Except tiny changes, unit tests remain the same in order to prove stability of the code after refactoring. In the following PR we will disconnect GKE operators from the deprecated hooks, so it will be easy to remove them in the future.

@boring-cyborg boring-cyborg bot added area:providers area:system-tests provider:cncf-kubernetes Kubernetes (k8s) provider related issues provider:google Google (including GCP) related issues labels Mar 22, 2024
@VladaZakharova
Copy link
Contributor

Hi @potiuk ! Can you please take a look on this PR? This is a blocker for several other PRs for GKE :c

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Not a complex one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers area:system-tests provider:cncf-kubernetes Kubernetes (k8s) provider related issues provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants