external-secrets: Add base plugin with ExternalSecret views#874
external-secrets: Add base plugin with ExternalSecret views#874vtushar06 wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a new external-secrets Headlamp plugin that adds list and detail views for External Secrets Operator (ESO) ExternalSecret resources, including an install-detection gate and initial i18n/test/storybook setup.
Changes:
- Adds an
ExternalSecretKubeObjectwrapper plus typed helpers for store/target/conditions handling. - Implements ExternalSecret list + detail pages (including Ready status labeling, target Secret linking, and a “Data mappings” section).
- Adds ESO install detection hook/banner, i18n scaffolding, unit tests, and Storybook storyshots.
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds the external-secrets plugin entry to the repository plugin list. |
| external-secrets/tsconfig.json | Plugin TypeScript configuration extending Headlamp plugin defaults. |
| external-secrets/src/storybook.test.tsx | Enables storyshot-based snapshot testing for stories. |
| external-secrets/src/resources/externalSecretTypes.ts | Defines ESO ExternalSecret types and helper functions. |
| external-secrets/src/resources/externalSecretTypes.test.ts | Unit tests for ExternalSecret type helpers. |
| external-secrets/src/resources/externalSecret.ts | Implements the ExternalSecret KubeObject wrapper and convenience getters. |
| external-secrets/src/resources/conditions.ts | Condition parsing helpers used for status handling. |
| external-secrets/src/resources/conditions.test.ts | Unit tests for condition helpers. |
| external-secrets/src/isESOInstalled.ts | Cluster API probe to detect whether ESO is installed. |
| external-secrets/src/index.tsx | Registers sidebar entries and routes for the ExternalSecrets UI. |
| external-secrets/src/hooks/useESOInstalled.tsx | Hook to drive install-check UI behavior. |
| external-secrets/src/headlamp-plugin.d.ts | Asset/module typings for the plugin build. |
| external-secrets/src/components/externalsecrets/List.tsx | ExternalSecrets list view with store/target/ready/refresh columns. |
| external-secrets/src/components/externalsecrets/Detail.tsx | ExternalSecret detail view with store/target/status/data/conditions sections. |
| external-secrets/src/components/common/CommonComponents.tsx | Shared UI: install banner, ready label, and data mapping table. |
| external-secrets/src/components/common/CommonComponents.stories.tsx | Stories for shared components (used for storyshots). |
| external-secrets/README.md | Plugin-level documentation (features, prerequisites, dev/test guidance). |
| external-secrets/package.json | Plugin package metadata, scripts, linting, i18n configuration, overrides. |
| external-secrets/locales/en/translation.json | Initial English i18n strings for the plugin UI. |
| external-secrets/.gitignore | Plugin-local ignores for dependencies/build outputs and editor artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Set up the package for a new External Secrets Operator plugin, following the layout of the other plugins in this repo (keda): headlamp-plugin scripts, shared eslint and prettier config, the storyshots test harness, and typescript pinned to 5.6.2 the same way knative pins it. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
Model external-secrets.io/v1 ExternalSecret as a KubeObject subclass. The pure logic (condition lookup, store reference defaults, and the target Secret name falling back to the resource name) lives in lib-free modules so it stays unit testable, and the class getters delegate to it. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
Probe /apis/external-secrets.io/v1 and expose the result through a hook, the same approach keda and cert-manager use. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
Add the not-installed banner with a pointer to the ESO install guide, the install-check wrapper, a Ready status label that surfaces the condition reason, and the Data section that maps provider entries to target Secret keys. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
The list shows the referenced store, the target Secret linked to its details page, the Ready condition, the refresh interval, and the last refresh time. The details view adds the Ready reason and message, the data mappings, and the standard conditions section. Register both views plus the sidebar entry. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
Cover the condition lookup (True/False/Unknown/absent) and the spec defaults: target Secret name falling back to the resource name, and the store kind defaulting to SecretStore. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
The banner, ready label, and data section render from plain props, so these stories double as snapshot tests through the storyshots harness. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
Generated with npm run i18n. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
Document the features, the ESO v1 API requirement, development and testing steps, and the follow-up roadmap. Add the plugin to the Current Plugins table. Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
f8fe29e to
511ad56
Compare
|
Hi @vtushar06 , Could you attach the screenshots of plugin working in the PR |
will share soon |
once we are done with these two then you are much welcome for review, Thanks :) |
|
@illume below are visuals from a kind cluster with ESO 0.20 installed, one healthy and one failing sync. Screen.Recording.2026-07-02.at.1.29.06.PM.mov |
|
@illume @joaquimrocha guys can you please help me in building this plugin for headlamp :) |
|
@illume @joaquimrocha gentle remainder I have posted screenshots (healthy and failing sync from a kind cluster with ESO 0.20) and CI is green. A first look or a steer on direction whenever you have a window would be great. |
What
First version of an External Secrets Operator plugin, as proposed in #873. It covers the ExternalSecret resource:
kind/name), target Secret linked to its details page, Ready condition as a status label, refresh interval, last refresh time.spec.dataandspec.dataFrom), and the standard conditions section.GET /apis/external-secrets.io/v1) and shows an install pointer when it is not, following the keda/cert-manager pattern.The structure mirrors keda: a
KubeObjectsubclass for the CRD, an install-check hook, and per-resource components. Strings are i18n-wrapped from the start (headlamp.i18n: [en]), the pure helpers have unit tests, and the presentational components have stories that double as snapshot tests.SecretStore/ClusterSecretStore (Valid condition) and PushSecret views are planned follow-ups in #873, which also has two open questions for maintainers (v1 vs v1beta1 support, and structure feedback before this grows).
Testing
cd external-secrets && npm test(alsotsc,lint,format --check,build, all clean):I have not run this against a live ESO cluster yet; I am setting that up and will attach screenshots of the list and details views (including a failing sync) as a follow-up comment.
cc @illume
Part of #873