{"id":16941220,"url":"https://github.com/iceber/scheme","last_synced_at":"2025-04-11T19:30:55.236Z","repository":{"id":44912894,"uuid":"434674300","full_name":"Iceber/scheme","owner":"Iceber","description":"register kubernetes global scheme with plugins","archived":false,"fork":false,"pushed_at":"2023-01-16T04:51:00.000Z","size":65,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T15:21:16.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Iceber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-03T17:09:15.000Z","updated_at":"2023-08-01T13:18:35.000Z","dependencies_parsed_at":"2023-02-10T01:16:41.664Z","dependency_job_id":null,"html_url":"https://github.com/Iceber/scheme","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fscheme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fscheme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fscheme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fscheme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Iceber","download_url":"https://codeload.github.com/Iceber/scheme/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248466777,"owners_count":21108534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:08:59.817Z","updated_at":"2025-04-11T19:30:55.211Z","avatar_url":"https://github.com/Iceber.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Global Scheme Demo\n\n以插件的形式注册任何资源的 scheme 到 global scheme 中，主要用于 CRD 资源的结构注册\n\n**实际这种资源注册方式，不仅仅可以用于注册资源的 scheme，对于 cr 来说，我们可以在业务层抽象出接口，然后由具体的 cr 插件来实现，通过注册到业务程序中调用。实现对 cr 更加开放和强大的支持**\n\n```sh\n$ make run\ngo build --buildmode=plugin -o ./plugins/karmada.so ./plugins/karmada\ngo build --buildmode=plugin -o ./plugins/clusterapi.so ./plugins/clusterapi\ngo build -o globalscheme main.go\n./globalscheme\nregister karmada\nregister karmada\n+-------------------------------+----------------------------+-------------------------------------+\n|          APIVersion           |            Kind            |               Struct                |\n+-------------------------------+----------------------------+-------------------------------------+\n|  cluster.karmada.io/v1alpha1  |       CreateOptions        |          v1.CreateOptions           |\n|              v1               |        APIVersions         |           v1.APIVersions            |\n|              v1               |          APIGroup          |             v1.APIGroup             |\n|   cluster.x-k8s.io/v1beta1    |   MachineDeploymentList    |    v1beta1.MachineDeploymentList    |\n|   work.karmada.io/v1alpha1    |         GetOptions         |            v1.GetOptions            |\n|  cluster.karmada.io/v1alpha1  |         WatchEvent         |            v1.WatchEvent            |\n|  cluster.karmada.io/v1alpha1  |       DeleteOptions        |          v1.DeleteOptions           |\n|   cluster.x-k8s.io/v1beta1    |       DeleteOptions        |          v1.DeleteOptions           |\n|   cluster.x-k8s.io/v1beta1    |       CreateOptions        |          v1.CreateOptions           |\n|   cluster.x-k8s.io/v1beta1    |        PatchOptions        |           v1.PatchOptions           |\n|   work.karmada.io/v1alpha1    | ClusterResourceBindingList | v1alpha1.ClusterResourceBindingList |\n|  work.karmada.io/__internal   |         WatchEvent         |          v1.InternalEvent           |\n|  cluster.karmada.io/v1alpha1  |        PatchOptions        |           v1.PatchOptions           |\n|   cluster.x-k8s.io/v1beta1    |          Cluster           |           v1beta1.Cluster           |\n|   cluster.x-k8s.io/v1beta1    |       UpdateOptions        |          v1.UpdateOptions           |\n|   work.karmada.io/v1alpha1    |   ClusterResourceBinding   |   v1alpha1.ClusterResourceBinding   |\n|   work.karmada.io/v1alpha1    |      ResourceBinding       |      v1alpha1.ResourceBinding       |\n|   cluster.x-k8s.io/v1beta1    |        ListOptions         |           v1.ListOptions            |\n|              v1               |           Status           |              v1.Status              |\n|   work.karmada.io/v1alpha1    |         WatchEvent         |            v1.WatchEvent            |\n|   work.karmada.io/v1alpha1    |       CreateOptions        |          v1.CreateOptions           |\n|   work.karmada.io/v1alpha1    |        PatchOptions        |           v1.PatchOptions           |\n|   cluster.x-k8s.io/v1beta1    |         MachineSet         |         v1beta1.MachineSet          |\n|   work.karmada.io/v1alpha1    |    ResourceBindingList     |    v1alpha1.ResourceBindingList     |\n| cluster.karmada.io/__internal |         WatchEvent         |          v1.InternalEvent           |\n|  cluster.karmada.io/v1alpha1  |       UpdateOptions        |          v1.UpdateOptions           |\n|   cluster.x-k8s.io/v1beta1    |        MachineList         |         v1beta1.MachineList         |\n|   cluster.x-k8s.io/v1beta1    |     MachineHealthCheck     |     v1beta1.MachineHealthCheck      |\n|   cluster.x-k8s.io/v1beta1    |       MachineSetList       |       v1beta1.MachineSetList        |\n|   work.karmada.io/v1alpha1    |       DeleteOptions        |          v1.DeleteOptions           |\n|   work.karmada.io/v1alpha1    |       UpdateOptions        |          v1.UpdateOptions           |\n|  cluster.karmada.io/v1alpha1  |        ClusterList         |        v1alpha1.ClusterList         |\n|              v1               |        APIGroupList        |           v1.APIGroupList           |\n|   cluster.x-k8s.io/v1beta1    |        ClusterClass        |        v1beta1.ClusterClass         |\n|   work.karmada.io/v1alpha1    |          WorkList          |          v1alpha1.WorkList          |\n|  cluster.karmada.io/v1alpha1  |        ListOptions         |           v1.ListOptions            |\n|   cluster.x-k8s.io/v1beta1    |          Machine           |           v1beta1.Machine           |\n|   cluster.x-k8s.io/v1beta1    |     MachineDeployment      |      v1beta1.MachineDeployment      |\n|   cluster.x-k8s.io/v1beta1    |        ClusterList         |         v1beta1.ClusterList         |\n|   cluster.x-k8s.io/v1beta1    |         WatchEvent         |            v1.WatchEvent            |\n|  cluster.x-k8s.io/__internal  |         WatchEvent         |          v1.InternalEvent           |\n|   cluster.x-k8s.io/v1beta1    |         GetOptions         |            v1.GetOptions            |\n|              v1               |      APIResourceList       |         v1.APIResourceList          |\n|   cluster.x-k8s.io/v1beta1    |      ClusterClassList      |      v1beta1.ClusterClassList       |\n|   cluster.x-k8s.io/v1beta1    |   MachineHealthCheckList   |   v1beta1.MachineHealthCheckList    |\n|   work.karmada.io/v1alpha1    |            Work            |            v1alpha1.Work            |\n|   work.karmada.io/v1alpha1    |        ListOptions         |           v1.ListOptions            |\n|  cluster.karmada.io/v1alpha1  |          Cluster           |          v1alpha1.Cluster           |\n|  cluster.karmada.io/v1alpha1  |         GetOptions         |            v1.GetOptions            |\n+-------------------------------+----------------------------+-------------------------------------+\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficeber%2Fscheme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficeber%2Fscheme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficeber%2Fscheme/lists"}