Skip to content

external-secrets: Add base plugin with ExternalSecret views#874

Open
vtushar06 wants to merge 9 commits into
headlamp-k8s:mainfrom
vtushar06:external-secrets-plugin
Open

external-secrets: Add base plugin with ExternalSecret views#874
vtushar06 wants to merge 9 commits into
headlamp-k8s:mainfrom
vtushar06:external-secrets-plugin

Conversation

@vtushar06

@vtushar06 vtushar06 commented Jul 2, 2026

Copy link
Copy Markdown

What

First version of an External Secrets Operator plugin, as proposed in #873. It covers the ExternalSecret resource:

  • List: referenced store (kind/name), target Secret linked to its details page, Ready condition as a status label, refresh interval, last refresh time.
  • Details: store and target Secret, Ready condition with its reason and message, refresh interval/policy, synced resource version, a Data section mapping provider entries to target Secret keys (spec.data and spec.dataFrom), and the standard conditions section.
  • Detects whether ESO is installed (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 KubeObject subclass 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 (also tsc, 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

Copilot AI review requested due to automatic review settings July 2, 2026 06:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ExternalSecret KubeObject wrapper 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.

Comment thread external-secrets/src/components/externalsecrets/Detail.tsx
Comment thread external-secrets/src/components/common/CommonComponents.tsx
Comment thread external-secrets/.gitignore
Comment thread external-secrets/src/components/externalsecrets/List.tsx
vtushar06 added 9 commits July 2, 2026 12:39
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>
@vtushar06 vtushar06 marked this pull request as draft July 2, 2026 07:10
@vtushar06 vtushar06 force-pushed the external-secrets-plugin branch from f8fe29e to 511ad56 Compare July 2, 2026 07:10
@itvi-1234

Copy link
Copy Markdown

Hi @vtushar06 , Could you attach the screenshots of plugin working in the PR

@vtushar06

Copy link
Copy Markdown
Author

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.

will share soon

@vtushar06

Copy link
Copy Markdown
Author

which also has two open questions for maintainers

once we are done with these two then you are much welcome for review, Thanks :)

@vtushar06

Copy link
Copy Markdown
Author

@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

@vtushar06 vtushar06 marked this pull request as ready for review July 2, 2026 08:03
@vtushar06

Copy link
Copy Markdown
Author

@illume @joaquimrocha guys can you please help me in building this plugin for headlamp :)

@vtushar06

vtushar06 commented Jul 9, 2026

Copy link
Copy Markdown
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants