{"id":22885047,"url":"https://github.com/mark8s/crd-demo","last_synced_at":"2025-07-16T11:05:57.513Z","repository":{"id":112106813,"uuid":"468285918","full_name":"mark8s/crd-demo","owner":"mark8s","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-10T10:00:54.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T22:42:24.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mark8s.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-10T10:00:38.000Z","updated_at":"2022-03-10T10:00:57.000Z","dependencies_parsed_at":"2023-07-31T22:15:58.789Z","dependency_job_id":null,"html_url":"https://github.com/mark8s/crd-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fcrd-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fcrd-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fcrd-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fcrd-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mark8s","download_url":"https://codeload.github.com/mark8s/crd-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246514286,"owners_count":20790016,"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-12-13T19:31:16.892Z","updated_at":"2025-03-31T17:55:39.592Z","avatar_url":"https://github.com/mark8s.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### k8s client 调用 crd \n\n参考： \n\u003e  https://www.martin-helmich.de/en/blog/kubernetes-crd-client.html\n\n\u003e  https://www.cnblogs.com/double12gzh/p/13734830.html\n\n```yaml\ngo get k8s.io/client-go@v0.17.0\n\ngo get k8s.io/apimachinery@v0.17.0\n\ngo get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5\n\ncontroller-gen object paths=./api/types/v1alpha1/project.go\n\n```\n\n#### 效果\n自定义一个crd和cd，并apply到k8s中。通过注册client，使用client进行cr的crud以及watch操作。\n使用了`controller-gen`生成了部分代码。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark8s%2Fcrd-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmark8s%2Fcrd-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark8s%2Fcrd-demo/lists"}