{"id":50862427,"url":"https://github.com/projectcapsule/headlamp-plugin","last_synced_at":"2026-06-14T22:04:47.115Z","repository":{"id":363656770,"uuid":"1262985376","full_name":"projectcapsule/headlamp-plugin","owner":"projectcapsule","description":"Headlamp Plugins for Project Capsule","archived":false,"fork":false,"pushed_at":"2026-06-09T19:34:25.000Z","size":219,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-09T21:20:14.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/projectcapsule.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-08T14:06:23.000Z","updated_at":"2026-06-09T20:41:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/projectcapsule/headlamp-plugin","commit_stats":null,"previous_names":["projectcapsule/headlamp-plugin"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/projectcapsule/headlamp-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectcapsule%2Fheadlamp-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectcapsule%2Fheadlamp-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectcapsule%2Fheadlamp-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectcapsule%2Fheadlamp-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectcapsule","download_url":"https://codeload.github.com/projectcapsule/headlamp-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectcapsule%2Fheadlamp-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34339222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-06-14T22:04:46.442Z","updated_at":"2026-06-14T22:04:47.110Z","avatar_url":"https://github.com/projectcapsule.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# headlamp-plugins\nHeadlamp Plugins for Project Capsule\n\n[![GitHub Release](https://img.shields.io/github/v/release/projectcapsule/headlamp-plugin?include_prereleases\u0026sort=semver)](https://github.com/projectcapsule/headlamp-plugin/releases)\n[![License](https://img.shields.io/github/license/projectcapsule/headlamp-plugin)](https://github.com/projectcapsule/headlamp-plugin/blob/main/LICENSE)\n\nA [Headlamp](https://headlamp.dev/) plugin for [Capsule](https://projectcapsule.dev/) — the Kubernetes multi-tenancy operator.\n\nThe plugin brings first-class multi-tenancy awareness to the Headlamp UI, including tenant-scoped navigation, rich tenant metadata, quota visualization, and visibility into what resources are being replicated by Capsule.\n\n## Features\n\n- **Tenant Switcher** — Multi-select tenant chooser in the app bar that scopes the entire UI to the selected tenants' namespaces.\n- **Tenant Views** — Full list and detail pages for Tenants, including owners, state, namespace lists, and rich metadata (icon, description, links, banner) via annotations.\n- **Capsule Overview** — At-a-glance dashboard with tenant activity, readiness of managed namespaces, Global Quotas, TenantResources, and replicated objects.\n- **Custom Quotas** — Dedicated list and detail views for both `CustomQuota` and `GlobalCustomQuota`, with usage pies, claims breakdown, and source definitions.\n- **Tenant Resources** — Powerful support for `TenantResource` and `GlobalTenantResource`:\n  - Grouped tables of managed objects\n  - \"Defined Resources\" view (supports legacy + modern `namespacedItems` / `rawItems` / `generators`)\n  - Server-Side Apply (SSA) managed fields inspection\n  - One-click force reconcile action\n- **Readiness Visualization** — Consistent use of colored status indicators and small pie charts for readiness of namespaces, quotas, and managed objects.\n- **Scoped Filtering** — Automatic namespace filter updates when navigating from tenant-owned resources.\n\n## Installation\n\n### Plugin Manager (Recommended - In-Cluster)\n\nEnable the pluginmanager along with the release of headlamp and add the capsule-plugin as entry:\n\n```yaml\npluginsManager:\n  enabled: true\n  configContent: |\n    plugins:\n      - name: capsule\n        source: https://artifacthub.io/packages/headlamp/headlamp-capsule/capsule\n        version: 0.1.0-beta1\n    installOptions:\n      parallel: true\n      maxConcurrent: 2\n```\n\n### Using a Release (Recommended - Client)\n\n1. Download the latest `capsule-plugin-*.tar.gz` from the [Releases](https://github.com/projectcapsule/headlamp-plugin/releases) page.\n2. Open Headlamp.\n3. Go to **Settings → Plugins → Load plugin from file** and select the downloaded archive.\n4. The **Capsule** section will appear in the sidebar.\n\n### Development / Hot Reload\n\nSee the [Development](#development) section below.\n\n## Tenant Metadata Annotations\n\nYou can enrich how Tenants appear in the plugin by adding annotations to your `Tenant` resources.\n\n| Annotation                          | Purpose                                      | Example Value                                      |\n|-------------------------------------|----------------------------------------------|----------------------------------------------------|\n| `info.projectcapsule.dev/icon`      | Avatar/icon for the tenant                   | `https://example.com/my-tenant-icon.png`           |\n| `info.projectcapsule.dev/description` | Short description shown in lists and chooser | `Production tenant for the payments team`          |\n| `info.projectcapsule.dev/links`     | JSON array of quick links                    | `'[{\"title\":\"Dashboard\",\"url\":\"https://...\"}]'`    |\n| `info.projectcapsule.dev/banner`    | Banner image at the top of the tenant detail | `https://example.com/tenant-banner.jpg`            |\n\n**Example:**\n\n```yaml\napiVersion: capsule.clastix.io/v1beta2\nkind: Tenant\nmetadata:\n  name: payments\n  annotations:\n    info.projectcapsule.dev/icon: https://example.com/payments-icon.png\n    info.projectcapsule.dev/description: Production tenant for the payments team\n    info.projectcapsule.dev/links: '[{\"title\":\"Grafana\",\"url\":\"https://grafana.example.com/d/payments\"},{\"title\":\"Runbook\",\"url\":\"https://wiki.example.com/payments-runbook\"}]'\n    info.projectcapsule.dev/banner: https://example.com/payments-banner.jpg\nspec:\n  owners:\n    - kind: Group\n      name: payments-team\n```\n\nThese annotations are used in the tenant chooser, tenant lists, tenant details, and the Capsule overview.\n\n\u003e **Note:** The `links` annotation must be a valid JSON array of objects containing at least `title` and `url`.\n\n## TenantResources \u0026 GlobalTenantResources\n\nThe plugin provides rich support for Capsule's replication resources:\n\n- Visual breakdown of what each `TenantResource` / `GlobalTenantResource` is configured to replicate.\n- Live view of the actual objects that have been applied (with SSA ownership information).\n- Ability to trigger reconciliation directly from the UI.\n- Support for both the modern `resources` array format and older flat resource definitions.\n\n## Development\n\n### Prerequisites\n\n- Node.js (v20+ recommended)\n- A Kubernetes cluster with Capsule CRDs installed\n- Headlamp (desktop app or from source) connected to that cluster\n- At least one `Tenant` that your user can list\n\n### Getting Started\n\n```bash\ngit clone https://github.com/projectcapsule/headlamp-plugin.git\ncd headlamp-plugin\nnpm install\n```\n\n### Running in Development Mode\n\n```bash\nnpm start\n```\n\nThis starts the development server on port `4466` by default.\n\nThen load the plugin in Headlamp using the **\"Load plugin from URL\"** feature (point it at `http://localhost:4466`).\n\n\u003e **Important:** The dev server only serves the plugin JavaScript. You must run it against a real Headlamp instance that is connected to a cluster with Capsule.\n\n### Build \u0026 Package\n\n```bash\nnpm run build\nnpm run package\n```\n\nThis produces a `.tar.gz` file in the root that can be loaded via **Settings → Plugins → Load plugin from file**.\n\n### Testing\n\n```bash\nnpm test\n```\n\n### Other useful commands\n\n| Command              | Description                          |\n|----------------------|--------------------------------------|\n| `npm run build`      | Production build                     |\n| `npm run lint`       | Lint the project                     |\n| `npm run lint-fix`   | Auto-fix lint issues                 |\n| `npm run tsc`        | Type check                           |\n| `npm run storybook`  | Run Storybook (if stories are added) |\n\n## Related Projects\n\n- [Capsule](https://github.com/projectcapsule/capsule) — The Kubernetes multi-tenancy operator\n- [Headlamp](https://github.com/kubernetes-sigs/headlamp) — An extensible Kubernetes UI\n\n## Contributing\n\nContributions are welcome! Please open an issue or pull request on [GitHub](https://github.com/projectcapsule/headlamp-plugin).\n\nWhen contributing, please:\n\n- Run `npm run lint` and `npm run build` before submitting\n- Add or update tests for new helper functions or complex logic\n- Keep the modular structure (components are grouped under `tenants/`, `quotas/`, `tenant-resources/`, etc.)\n\n## License\n\nApache-2.0\n\n---\n\nMade with ❤️ for the Capsule and Headlamp communities.\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e dbeffcd3 (feat: first commit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectcapsule%2Fheadlamp-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectcapsule%2Fheadlamp-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectcapsule%2Fheadlamp-plugin/lists"}