{"id":38717888,"url":"https://github.com/ligato/crd-example","last_synced_at":"2026-01-17T11:05:05.720Z","repository":{"id":86338932,"uuid":"143301943","full_name":"ligato/crd-example","owner":"ligato","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-12T19:43:16.000Z","size":5856,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-14T08:57:13.299Z","etag":null,"topics":["crd","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ligato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-08-02T13:57:02.000Z","updated_at":"2024-02-10T16:50:03.000Z","dependencies_parsed_at":"2023-06-18T12:18:54.640Z","dependency_job_id":null,"html_url":"https://github.com/ligato/crd-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ligato/crd-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligato%2Fcrd-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligato%2Fcrd-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligato%2Fcrd-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligato%2Fcrd-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ligato","download_url":"https://codeload.github.com/ligato/crd-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ligato%2Fcrd-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28506593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T10:25:30.148Z","status":"ssl_error","status_checked_at":"2026-01-17T10:25:29.718Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["crd","kubernetes"],"created_at":"2026-01-17T11:05:05.626Z","updated_at":"2026-01-17T11:05:05.711Z","avatar_url":"https://github.com/ligato.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ligato/crd-example.svg?branch=master)](https://travis-ci.org/ligato/crd-example)\n[![GitHub license](https://img.shields.io/badge/license-Apache%20license%202.0-blue.svg)](https://github.com/ligato/crd-example/blob/master/LICENSE)\n\nCustom Resource Definition Example\n==================================\n\nThis file shows an example of creating Custom Resource Definitions (CRDs) to\nintegrate inside of a Ligato plugin. At their essence, CRDs are an extension\nof the Kubernetes API. [This](1) page describes CRDs in detail, while [this](2)\npage describes extending Kubernetes with CRDs.\n\nTo programmatically extend the Kubernetes API with CRDs, we will show an\nexample comprising three distinct parts:\n\n* A protobuf file, in this case `api/crdexample.proto`, which defines the API\n  resources you want to expose.\n* A types.go file, in this case `pkg/apis/crdexample.io/v1/types.go`, which\n  defines the CRD API structures and uses the generated Go code from the\n  protobuf file as it's schema.\n* The Kubernetes code generators to generate all the structural pieces\n  necessary to build an application to handle the CRDs. This includes listers,\n  watchers, and informers.\n\nThis combination is powerful and shows how extending the Kubernetes API is\nan effective way to introduce new resources types almost natively.\n\nRunning the Example\n-------------------\n\nThe example requires a working Kubernetes install. A Minikube install will work\njust fine.\n\nTo build and install the example using go v1.10.x:\n\n```\nmake all\n```\n\nTo build and install the example using go v1.11.x:\n\n```\nGO111MODULE=on make all\n```\n\nTo run the example:\n\n```\nkubectl label --overwrite nodes docker-for-desktop app=crdservice-node\nkubectl create -f conf/crd-daemonset.yaml\n```\n\nIf you want to stop the example:\n\n```\nkubectl delete -f conf/crd-daemonset.yaml\n```\n\nUpdating the Generated Code\n---------------------------\n\nTo update the generated code:\n\n```\nPATH=$GOPATH/bin:$PATH go generate ./...\nCODEGEN_PKG=./vendor/k8s.io/code-generator ./scripts/update-codegen.sh\n```\n\n[1]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/\n[2]: https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fligato%2Fcrd-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fligato%2Fcrd-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fligato%2Fcrd-example/lists"}