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

Refactor GKE hooks #30

Closed
wants to merge 1 commit into from
Closed

Conversation

moiseenkov
Copy link
Collaborator

@moiseenkov moiseenkov commented Mar 20, 2024

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.

@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from 4616eb0 to 96b8dc8 Compare March 20, 2024 13:52
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from 96b8dc8 to c860821 Compare March 20, 2024 15:22
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from c860821 to 972ef1e Compare March 20, 2024 16:38
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from 972ef1e to 641fece Compare March 21, 2024 08:02
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from 641fece to 809a789 Compare March 21, 2024 09:26
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from 809a789 to aa7f1a0 Compare March 21, 2024 10:42
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from aa7f1a0 to 456fb4e Compare March 21, 2024 12:44
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from 456fb4e to 801a8a0 Compare March 21, 2024 13:43
@moiseenkov moiseenkov force-pushed the k8s-start-job-deferrable branch from 801a8a0 to 64d7e2d Compare March 22, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants