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

create a mutatingWebhook as the adapter between clusternet obj and tke cluser obj #1

Open
huxiaoliang opened this issue Jun 28, 2021 · 0 comments

Comments

@huxiaoliang
Copy link
Collaborator

huxiaoliang commented Jun 28, 2021

Problem:

The clusternet used cluster object is different from tke and tkestack, ManagedCluster in cluster is used to define the cluster managed by hub cluster, but tkestck/tke also have similar cluster obj but different spac, so it will cause compatibility issue and hard to integration.

Solution:

  1. In order to consolidate them to support both user case, a mutatingWebhook get involved as the bridge to sync them, after that,
    both side only focus on individual business logic. With this loose-coupled design, the tke/tkestack still can use existing cluster object for create/list/query operation, clusternet focus on ManagedCluster register and status update.

  2. The mutatingWebhook should designed as provider or plug-in mechanism so that support tke and tkestack case

  3. sync status from ManagedCluster to tke and tkestack

  • tkestack
root@vm-0-80-ubuntu:~/submariner-test# kubectl get cluster.platform.tkestack.io
NAME     CREATED AT
global   2021-06-17T08:07:05Z
root@vm-0-80-ubuntu:~/submariner-test# 
  • clusternet
root@VM-0-56-ubuntu:~# kubectl get ManagedCluster.clusters.clusternet.io -n clusternet-fnbgq   
NAME                       CLUSTER-ID                             CLUSTER-TYPE                 KUBERNETES   READYZ   AGE
clusternet-cluster-gh7kt   fdcfbb35-e2f5-4327-b773-d39c60319822   EdgeClusterSelfProvisioned   v1.19.7      true     6d16h
root@VM-0-56-ubuntu:~# 

Reference:

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

No branches or pull requests

1 participant