{"id":25343884,"url":"https://github.com/appscode-cloud/vcluster-plugin","last_synced_at":"2025-04-08T14:46:22.629Z","repository":{"id":250249089,"uuid":"833913411","full_name":"appscode-cloud/vcluster-plugin","owner":"appscode-cloud","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-28T04:45:13.000Z","size":19859,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T11:05:31.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"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/appscode-cloud.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":"2024-07-26T03:09:35.000Z","updated_at":"2024-12-28T04:45:17.000Z","dependencies_parsed_at":"2024-12-28T03:37:09.628Z","dependency_job_id":null,"html_url":"https://github.com/appscode-cloud/vcluster-plugin","commit_stats":null,"previous_names":["kubeops/vcluster-plugin","appscode-cloud/vcluster-plugin"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fvcluster-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fvcluster-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fvcluster-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fvcluster-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appscode-cloud","download_url":"https://codeload.github.com/appscode-cloud/vcluster-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247866114,"owners_count":21009238,"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":"2025-02-14T10:59:19.015Z","updated_at":"2025-04-08T14:46:22.594Z","avatar_url":"https://github.com/appscode-cloud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## vCluster Plugin\n\nThis [vCluster](https://github.com/loft-sh/vcluster) plugin syncs [CAProviderClass](https://github.com/kubeops/csi-driver-cacerts) crds from the vcluster into the host cluster.\n\nThis plugin has been forked from [loft-sh/vcluster-plugin-example](https://github.com/loft-sh/vcluster-plugin-example). For more information how to develop plugins in vcluster and a complete walk through, please refer to the [official vcluster docs](https://www.vcluster.com/docs/v0.19/advanced-topics/plugins-overview). You can find additional examples [here](https://github.com/loft-sh/vcluster-sdk/tree/main/examples).\n\n### Using the Plugin\n\nTo use the plugin, create a new vcluster with the `plugin.yaml`:\n\n```\n# Install csi-driver-cacerts in host cluster\nhelm upgrade -i cert-manager-csi-driver-cacerts \\\n  oci://ghcr.io/appscode-charts/cert-manager-csi-driver-cacerts \\\n  --version v2024.10.17 \\\n  -n cert-manager --create-namespace --wait\n\n# Use public plugin.yaml\nvcluster create vcluster -n vcluster \\\n  -f https://github.com/appscode-cloud/vcluster-plugin/raw/master/plugin.yaml\n```\n\nThis will create a new vcluster with the plugin installed. After that, wait for vcluster to start up and check:\n\n```\n# Create a car in the virtual cluster\nvcluster connect vcluster -n vcluster -- kubectl apply -f manifests/sample.yaml\n\n# Check if the car was synced to the host cluster\nkubectl get caproviderclass -n vcluster\n```\n\n```\n# create a fake-reporting-secret in the host cluster\nkubectl apply -f manifests/fake_reporting_secret.yaml\n\n# create a pod in vcluster that uses the reporting secret\nvcluster connect vcluster -n vcluster -- kubectl apply -f manifests/reporting_secret_pod.yaml\n\n# check the pod is using the host secret directly\nkubectl get pods -n vcluster agent-x-default-x-vcluster -o yaml\n```\n\n### Building the Plugin\n\nTo just build the plugin image and push it to the registry, run:\n\n```\n# Build\ndocker build --push -t ghcr.io/appscode/vcluster-plugin-ace:v0.0.3 .\n\n# Multi-arch Build\n## Ensure docker builder with multi platform support\ndocker buildx create \\\n  --name container \\\n  --driver=docker-container\n\n## Build \u0026 push image\ndocker build --push \\\n  --builder container --platform linux/amd64,linux/arm64 \\\n  -t ghcr.io/appscode/vcluster-plugin-ace:v0.0.3 .\n```\n\nThen exchange the image in the `plugin.yaml`.\n\n## Development\n\nGeneral vcluster plugin project structure:\n```\n.\n├── go.mod              # Go module definition\n├── go.sum\n├── devspace.yaml       # Development environment definition\n├── devspace_start.sh   # Development entrypoint script\n├── Dockerfile          # Production Dockerfile \n├── main.go             # Go Entrypoint\n├── plugin.yaml         # Plugin Helm Values\n├── syncers/            # Plugin Syncers\n└── manifests/          # Additional plugin resources\n```\n\nBefore starting to develop, make sure you have installed the following tools on your computer:\n- [docker](https://docs.docker.com/)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/) with a valid kube context configured\n- [helm](https://helm.sh/docs/intro/install/), which is used to deploy vcluster and the plugin\n- [vcluster CLI](https://www.vcluster.com/docs/getting-started/setup) v0.6.0 or higher\n- [DevSpace](https://devspace.sh/cli/docs/quickstart), which is used to spin up a development environment\n- [Go](https://go.dev/dl/) programming language build tools\n\nAfter successfully setting up the tools, start the development environment with:\n```\ndevspace dev -n vcluster\n```\n\nAfter a while a terminal should show up with additional instructions. Enter the following command to start the plugin:\n```\ngo build -mod vendor -o plugin main.go \u0026\u0026 /vcluster/syncer start\n```\n\nYou can now change a file locally in your IDE and then restart the command in the terminal to apply the changes to the plugin.\n\nDelete the development environment with:\n```\ndevspace purge -n vcluster\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappscode-cloud%2Fvcluster-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappscode-cloud%2Fvcluster-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappscode-cloud%2Fvcluster-plugin/lists"}