{"id":38065682,"url":"https://github.com/codefresh-contrib/vcluster-prometheus-operator-plugin","last_synced_at":"2026-01-16T20:34:37.251Z","repository":{"id":246390419,"uuid":"820276006","full_name":"codefresh-contrib/vcluster-prometheus-operator-plugin","owner":"codefresh-contrib","description":"Plugin for vCluster (by loft.sh) that enables syncing Prometheus operator resources (ServiceMonitors and PodMonitors) from virtual clusters to host cluster","archived":false,"fork":false,"pushed_at":"2025-11-04T09:25:18.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-04T11:24:11.259Z","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/codefresh-contrib.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-26T06:43:19.000Z","updated_at":"2025-11-04T09:13:09.000Z","dependencies_parsed_at":"2024-06-27T19:09:16.884Z","dependency_job_id":"6c7f51d5-1df1-46b8-a6c9-e108915b61f0","html_url":"https://github.com/codefresh-contrib/vcluster-prometheus-operator-plugin","commit_stats":null,"previous_names":["codefresh-contrib/vcluster-prometheus-operator-plugin"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/codefresh-contrib/vcluster-prometheus-operator-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-contrib%2Fvcluster-prometheus-operator-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-contrib%2Fvcluster-prometheus-operator-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-contrib%2Fvcluster-prometheus-operator-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-contrib%2Fvcluster-prometheus-operator-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codefresh-contrib","download_url":"https://codeload.github.com/codefresh-contrib/vcluster-prometheus-operator-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-contrib%2Fvcluster-prometheus-operator-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-16T20:34:37.176Z","updated_at":"2026-01-16T20:34:37.238Z","avatar_url":"https://github.com/codefresh-contrib.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vCluster Prometheus operator plugin\n\n[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/codefresh-inc/codefresh-contrib%2Fvcluster-prometheus-operator-plugin%2Fci?type=cf-1)]( https://g.codefresh.io/public/accounts/codefresh-inc/pipelines/new/667d09d7db9387f8b1294868)\n\nThis repository contains a [vCluster plugin](https://www.vcluster.com/docs/v0.19/advanced-topics/plugins-overview) that syncs [Prometheus operator](https://github.com/prometheus-operator/prometheus-operator) resources from virtual clusters to the host cluster.\n\nCurrently only the very basic functionality is implemented so the plugin only supports syncing of `PodMonitor` and `ServiceMonitor` resources. This is to allow scraping of metrics from workloads running on virtual clusters from a signle Prometheus or Open Telemetry collector on the host (with [target allocator](https://github.com/open-telemetry/opentelemetry-operator/blob/main/cmd/otel-allocator/README.md) that supports Prometheus operator CRDs).\n\nThis plugin in it's latest version is compatibe with vCluster version `0.30.0`\n\n# Development\n\nFor more information how to develop plugins in vcluster, please refer to the [official vcluster docs](https://www.vcluster.com/docs/plugins/overview).\n\n## Using the Plugin in vcluster\n\nTo use the plugin, create a new vcluster with the `plugin.yaml`:\n\n```\n# Deploy Prometheus operator on host cluster with Helm:\nFor more info see -https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack?modal=install\n\n# Create vcluster with plugin\nvcluster create my-vcluster -n my-vcluster -f https://raw.githubusercontent.com/codefresh-contrib/vcluster-prometheus-operator-plugin/main/plugin.yaml\n```\n\nThis will create a new vcluster with the plugin installed. Then test the plugin with:\n\n```\n# Apply example ServicerMonitor\nvcluster connect my-vcluster -n my-vcluster -- kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/user-guides/getting-started/example-app-service-monitor.yaml\n\n# Check if car got correctly synced\nkubectl get servicemonitor -n my-vcluster\n```\n\n## Building the Plugin\nTo just build the plugin image and push it to the registry, run:\n```\n# Build\ndocker build . -t my-repo/my-plugin:0.0.1\n\n# Push\ndocker push my-repo/my-plugin:0.0.1\n```\n\nThen exchange the image in the `plugin.yaml`\n\n## Development Process\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.20.0 or higher\n- [DevSpace](https://devspace.sh/cli/docs/quickstart), which is used to spin up a development environment\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%2Fcodefresh-contrib%2Fvcluster-prometheus-operator-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefresh-contrib%2Fvcluster-prometheus-operator-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-contrib%2Fvcluster-prometheus-operator-plugin/lists"}