register kubernetes global scheme with plugins

Global Scheme Demo

以插件的形式注册任何资源的 scheme 到 global scheme 中,主要用于 CRD 资源的结构注册

实际这种资源注册方式,不仅仅可以用于注册资源的 scheme,对于 cr 来说,我们可以在业务层抽象出接口,然后由具体的 cr 插件来实现,通过注册到业务程序中调用。实现对 cr 更加开放和强大的支持

$ make run
go build --buildmode=plugin -o ./plugins/karmada.so ./plugins/karmada
go build --buildmode=plugin -o ./plugins/clusterapi.so ./plugins/clusterapi
go build -o globalscheme main.go
./globalscheme
register karmada
register karmada
+-------------------------------+----------------------------+-------------------------------------+
|          APIVersion           |            Kind            |               Struct                |
+-------------------------------+----------------------------+-------------------------------------+
|  cluster.karmada.io/v1alpha1  |       CreateOptions        |          v1.CreateOptions           |
|              v1               |        APIVersions         |           v1.APIVersions            |
|              v1               |          APIGroup          |             v1.APIGroup             |
|   cluster.x-k8s.io/v1beta1    |   MachineDeploymentList    |    v1beta1.MachineDeploymentList    |
|   work.karmada.io/v1alpha1    |         GetOptions         |            v1.GetOptions            |
|  cluster.karmada.io/v1alpha1  |         WatchEvent         |            v1.WatchEvent            |
|  cluster.karmada.io/v1alpha1  |       DeleteOptions        |          v1.DeleteOptions           |
|   cluster.x-k8s.io/v1beta1    |       DeleteOptions        |          v1.DeleteOptions           |
|   cluster.x-k8s.io/v1beta1    |       CreateOptions        |          v1.CreateOptions           |
|   cluster.x-k8s.io/v1beta1    |        PatchOptions        |           v1.PatchOptions           |
|   work.karmada.io/v1alpha1    | ClusterResourceBindingList | v1alpha1.ClusterResourceBindingList |
|  work.karmada.io/__internal   |         WatchEvent         |          v1.InternalEvent           |
|  cluster.karmada.io/v1alpha1  |        PatchOptions        |           v1.PatchOptions           |
|   cluster.x-k8s.io/v1beta1    |          Cluster           |           v1beta1.Cluster           |
|   cluster.x-k8s.io/v1beta1    |       UpdateOptions        |          v1.UpdateOptions           |
|   work.karmada.io/v1alpha1    |   ClusterResourceBinding   |   v1alpha1.ClusterResourceBinding   |
|   work.karmada.io/v1alpha1    |      ResourceBinding       |      v1alpha1.ResourceBinding       |
|   cluster.x-k8s.io/v1beta1    |        ListOptions         |           v1.ListOptions            |
|              v1               |           Status           |              v1.Status              |
|   work.karmada.io/v1alpha1    |         WatchEvent         |            v1.WatchEvent            |
|   work.karmada.io/v1alpha1    |       CreateOptions        |          v1.CreateOptions           |
|   work.karmada.io/v1alpha1    |        PatchOptions        |           v1.PatchOptions           |
|   cluster.x-k8s.io/v1beta1    |         MachineSet         |         v1beta1.MachineSet          |
|   work.karmada.io/v1alpha1    |    ResourceBindingList     |    v1alpha1.ResourceBindingList     |
| cluster.karmada.io/__internal |         WatchEvent         |          v1.InternalEvent           |
|  cluster.karmada.io/v1alpha1  |       UpdateOptions        |          v1.UpdateOptions           |
|   cluster.x-k8s.io/v1beta1    |        MachineList         |         v1beta1.MachineList         |
|   cluster.x-k8s.io/v1beta1    |     MachineHealthCheck     |     v1beta1.MachineHealthCheck      |
|   cluster.x-k8s.io/v1beta1    |       MachineSetList       |       v1beta1.MachineSetList        |
|   work.karmada.io/v1alpha1    |       DeleteOptions        |          v1.DeleteOptions           |
|   work.karmada.io/v1alpha1    |       UpdateOptions        |          v1.UpdateOptions           |
|  cluster.karmada.io/v1alpha1  |        ClusterList         |        v1alpha1.ClusterList         |
|              v1               |        APIGroupList        |           v1.APIGroupList           |
|   cluster.x-k8s.io/v1beta1    |        ClusterClass        |        v1beta1.ClusterClass         |
|   work.karmada.io/v1alpha1    |          WorkList          |          v1alpha1.WorkList          |
|  cluster.karmada.io/v1alpha1  |        ListOptions         |           v1.ListOptions            |
|   cluster.x-k8s.io/v1beta1    |          Machine           |           v1beta1.Machine           |
|   cluster.x-k8s.io/v1beta1    |     MachineDeployment      |      v1beta1.MachineDeployment      |
|   cluster.x-k8s.io/v1beta1    |        ClusterList         |         v1beta1.ClusterList         |
|   cluster.x-k8s.io/v1beta1    |         WatchEvent         |            v1.WatchEvent            |
|  cluster.x-k8s.io/__internal  |         WatchEvent         |          v1.InternalEvent           |
|   cluster.x-k8s.io/v1beta1    |         GetOptions         |            v1.GetOptions            |
|              v1               |      APIResourceList       |         v1.APIResourceList          |
|   cluster.x-k8s.io/v1beta1    |      ClusterClassList      |      v1beta1.ClusterClassList       |
|   cluster.x-k8s.io/v1beta1    |   MachineHealthCheckList   |   v1beta1.MachineHealthCheckList    |
|   work.karmada.io/v1alpha1    |            Work            |            v1alpha1.Work            |
|   work.karmada.io/v1alpha1    |        ListOptions         |           v1.ListOptions            |
|  cluster.karmada.io/v1alpha1  |          Cluster           |          v1alpha1.Cluster           |
|  cluster.karmada.io/v1alpha1  |         GetOptions         |            v1.GetOptions            |
+-------------------------------+----------------------------+-------------------------------------+
Comments
  • [MEMBERSHIP REQUEST] New Member of Clusterpedia

    [MEMBERSHIP REQUEST] New Member of Clusterpedia

    List of my contributions to the Clusterpedia project

    I'm requesting to be a Member of Clusterpedia Community.

    • PRs authored

    • PRs reviewd

    • Issues responded to and created

    • Others

  • [MEMBERSHIP REQUEST] New Member of Clusterpedia

    [MEMBERSHIP REQUEST] New Member of Clusterpedia

    I'm requesting to be a Member of Clusterpedia Community.

    List of my contributions to the Clusterpedia project

    PRs authored

    PRs reviewed

    Issues created and responded to

    Others

  • [MEMBERSHIP REQUEST] New Member of Clusterpedia

    [MEMBERSHIP REQUEST] New Member of Clusterpedia

    List of my contributions to the Clusterpedia project

    • PRs authored https://github.com/clusterpedia-io/clusterpedia/pulls?q=+is%3Apr+author%3AIceber+

    • PRs reviewd

    • Issues responded to and created

    • Others

  • test

    test

    What happened?

    test

    What did you expect to happen?

    test

    How can we reproduce it (as minimally and precisely as possible)?

    test

    Anything else we need to know?

    No response

    Clusterpedia Version

    # replace the pod name of clusterpedia apiserver
    $ kubectl -n clusterpedia-system exec {clusterpedia-apiserver-pod-name} -- apiserver --version=raw
    # paste output here
    
    # replace the pod name of clusterpedia clustersynchro-manager
    $ kubectl -n clusterpedia-system exec {clustersynchro-manager-pod-name} -- clustersynchro-manager --version=raw
    # paste output here
    

    Host Kubernetes version

    $ kubectl version
    # paste output here
    
  • Test

    Test

    What happened?

    something

    What did you expect to happen?

    something

    How can we reproduce it (as minimally and precisely as possible)?

    something

    Anything else we need to know?

    No response

    Clusterpedia Version

    # replace the pod name of clusterpedia apiserver
    $ kubectl -n clusterpedia-system exec {clusterpedia-apiserver-pod-name} -- apiserver --version=raw
    # paste output here
    
    # replace the pod name of clusterpedia clustersynchro-manager
    $ kubectl -n clusterpedia-system exec {clustersynchro-manager-pod-name} -- clustersynchro-manager --version=raw
    # paste output here
    

    Host Kubernetes version

    $ kubectl version
    # paste output here
    
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

Related tags
A command tool to help user install oh-my-zsh plugins fast in a comfortable way

zshx A command tool to help user install oh-my-zsh plugins fast in a comfortable way. in other way, it is a zsh plugin package manager. How to use the

Feb 11, 2022
go program that installs and customizes ohmyzsh tmux vim via various plugins and other nice to haves
go program that installs and customizes ohmyzsh tmux vim via various plugins and other nice to haves

Pimp-My-Shell Table of Contents Pimp-My-Shell Install Usage About Resources Tmux Hotkeys VIM Hotkeys Adjusting Custom Aliases Mac Fix Terminal bind ke

Dec 22, 2022
Command line tools for creating and compiling JavaScript Minecraft plugins.

@customrealms/cli CustomRealms command-line tools for setting up and compiling JavaScript Minecraft plugins. Installation Install the CLI on your comp

Aug 2, 2022
kubeaudit helps you audit your Kubernetes clusters against common security controls

kubeaudit helps you audit your Kubernetes clusters against common security controls

Dec 30, 2022
The Keel CLI allows you to setup Keel on your local dev machine or on a Kubernetes cluster
The Keel CLI allows you to setup Keel on your local dev machine or on a Kubernetes cluster

keel-cli What is keel-cli The Keel CLI allows you to setup Keel on your local dev machine or on a Kubernetes cluster, launches and manages Keel instan

Oct 7, 2021
A CLI tool to display all dependencies or dependents of an object in a Kubernetes cluster.

kube-lineage A CLI tool to display all dependencies or dependents of an object in a Kubernetes cluster. Usage $ kube-lineage clusterrole system:metric

Jan 5, 2023
A client-side agent that connects any Kubernetes cluster to AWS
A client-side agent that connects any Kubernetes cluster to AWS

EKS Connector EKS Connector is a client-side agent that connects any Kubernetes cluster to AWS. How it works EKS Connector runs in Kubernetes as a Pod

Dec 28, 2022
go-editor is the clean go module that refractors from Kubernetes to help you edit resources in a command-line way.

go-editor The source code of go-editor comes from Kubernetes and refractor as the clean Go module. You can embed go-editor in your command-line tool l

Dec 5, 2021
Continuous Delivery with Spinnaker and Kubernetes
Continuous Delivery with Spinnaker and Kubernetes

Continuous Delivery with Spinnaker and Kubernetes Test Result Tutorial Build App This tutorial takes you through the process of creating a reliable an

Dec 8, 2021
The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster

Dapr CLI The Dapr CLI allows you to setup Dapr on your local dev machine or on a

Dec 23, 2021
mlp is a comman line tool responsible for creating, updating and deleting kubernetes resources based on files generated by Mia-Platform Console.

mlp is a comman line tool responsible for creating, updating and deleting kubernetes resources based on files generated by Mia-Platform Console.

Apr 28, 2022
vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI

vkectl Introduction vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI(Command Line Interface). It is written in

Aug 26, 2022
Kaweezle (Alpine based WSL2 Kubernetes distribution) root filesystem

Kaweezle Root Filesystem Run Vanilla Kubernetes on Windows with WSL 2 and Alpine Linux Explore the docs » Report Bug · Request Feature Table of Conten

Jan 23, 2022
Conda-boxes - A Kubernetes Controller CLI to manage Conda environments as volumes or Boxes

conda-boxes A Kubernetes Controller CLI to manage Conda environments as volumes

Mar 20, 2022
Implementations of the Coconut signing scheme, cross-compatible between Rust and Go.

Coconut Coconut [paper] is a distributed cryptographic signing scheme providing a high degree of privacy for its users. You can find an overview of ho

Dec 9, 2022
An improvement on the PoC for the privacy-preserving contact discovery scheme I implemented as part of my UCL masters degree

Privacy-Preserving Contact Discovery / ARKE - PoC This is an improved version of the work I submitted as part of my masters degree dissertation at UCL

Dec 18, 2021
This utility can be used for converting BSE Mutual fund scheme

go-mf-scheme-master-generator This utility can be used for converting BSE Mutual

Jan 21, 2022
Dec 27, 2022
The mec platform for service register/discovery/subscribe and other functions.roject main repo.

EdgeGallery MEP project Introduction Edgegallery MEP is an open source implementation of MEC platform according to ETSI MEC 003 [1] and 011 [2] docume

Nov 15, 2022