{"id":14156443,"url":"https://github.com/Eileen-Yu/kb-js-plugin","last_synced_at":"2025-08-06T02:33:23.267Z","repository":{"id":179250378,"uuid":"657423737","full_name":"Eileen-Yu/kb-js-plugin","owner":"Eileen-Yu","description":"A sample external plugin for kubebuilder in JavaScript.","archived":false,"fork":false,"pushed_at":"2023-09-16T04:28:48.000Z","size":78,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-24T11:41:39.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Eileen-Yu.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}},"created_at":"2023-06-23T03:12:21.000Z","updated_at":"2023-11-27T02:14:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"81a662c0-6656-45a0-8947-db4d17e5c0cf","html_url":"https://github.com/Eileen-Yu/kb-js-plugin","commit_stats":null,"previous_names":["eileen-yu/kb-js-plugin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eileen-Yu%2Fkb-js-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eileen-Yu%2Fkb-js-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eileen-Yu%2Fkb-js-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eileen-Yu%2Fkb-js-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eileen-Yu","download_url":"https://codeload.github.com/Eileen-Yu/kb-js-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228829176,"owners_count":17978162,"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-08-17T08:05:28.646Z","updated_at":"2024-12-09T03:31:39.673Z","avatar_url":"https://github.com/Eileen-Yu.png","language":"JavaScript","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# An External Plugin for Kubebuilder\n\nA sample external plugin written in Javascript.\n\n\n## Quick Start\n\n1. Build the js plugin into an executable\n```shell\n# Install Dependencies\nnpm ci\n\n# Build an executable into dist/kb-js-plugin/v1/kb-js-plugin\nnpm run build\n```\n\n2. Load the plugin and run kb command\n\n```shell\n# 1. Display help info for `init` / `create api` / `create webhook` / `edit` subcommand\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder init --plugins=kb-js-plugin/v1 --help\n\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder create api --plugins=kb-js-plugin/v1 --help\n\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder create webhook --plugins=kb-js-plugin/v1 --help\n\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder edit --plugins=kb-js-plugin/v1 --help\n\n\n# 2. scaffold the project by `init` subcommand with valid flag `--domain`\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder init --plugins=kb-js-plugin/v1 --domain eileen.io\n\n\n# 3. create an api for the project by `create api` subcommand with GVK\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder create api --plugins=kb-js-plugin/v1 --group webapp --version v1 --kind Guestbook\n\n\n# 4. create a webhook for the project by `create webhook` subcommand with GVK\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder create webhook --plugins=kb-js-plugin/v1 --group webapp --version v1 --kind Guestbook\n\n# 5. update the api for the project by `edit` subcommand\nEXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \\\n  kubebuilder edit --plugins=kb-js-plugin/v1\n\n```\n\n3. Check the output\n\nThe plugin triggered by `init` will generate the PROJECT file, and another file `initFile` with the domain you specified.\n\nThe plugin triggered by `create api` will generate a file `apiFile` with the GVK you specified.\n\nThe plugin triggered by `create webhook` will generate a file `webhookFile` with the GVK you specified.\n\nThe plugin triggered by `edit` will update the `apiFile`.\n\n\n## Showcase\n\n![output](https://github.com/kubernetes-sigs/kubebuilder/assets/48944635/1aac358e-6488-4166-bdef-0b73d916423a)\n\n## More info\n\n- [Tutorial for writing the external plugin with this JS sample](https://eileen.hungry-mg.site/post/how-to-extend-kubebuilder-by-writing-an-external-plugin/)\n- [KB book](https://book.kubebuilder.io/plugins/external-plugins)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEileen-Yu%2Fkb-js-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEileen-Yu%2Fkb-js-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEileen-Yu%2Fkb-js-plugin/lists"}