Skip to content

feat(cluster): add secret manager settings#2718

Open
rmnbrd wants to merge 7 commits into
stagingfrom
feat/secrets-manager-cluster-settings
Open

feat(cluster): add secret manager settings#2718
rmnbrd wants to merge 7 commits into
stagingfrom
feat/secrets-manager-cluster-settings

Conversation

@rmnbrd
Copy link
Copy Markdown
Contributor

@rmnbrd rmnbrd commented May 29, 2026

Summary

Adds the secret manager foundation at cluster settings level: API/client updates, cluster data-access hooks, shared secret manager add-on UI, modal/constraint handling, and the cluster settings add-ons route integration.

Screenshots / Recordings

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 59.49821% with 113 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.06%. Comparing base (e9c7761) to head (875b131).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...anager-modals/secret-manager-integration-modal.tsx 67.27% 12 Missing and 6 partials ⚠️
...ation-modal/gcp-secret-manager-manual-sections.tsx 20.00% 15 Missing and 1 partial ⚠️
libs/shared/util-clusters/src/index.ts 0.00% 12 Missing ⚠️
...secret-manager/get-readable-secret-manager-auth.ts 0.00% 8 Missing ⚠️
...r-modals/secret-manager-integration-constraints.ts 89.39% 2 Missing and 5 partials ⚠️
...ation-modal/aws-secret-manager-manual-sections.tsx 77.41% 3 Missing and 4 partials ⚠️
...et-manager/get-readable-secret-manager-provider.ts 0.00% 7 Missing ⚠️
.../src/secret-manager/get-secret-manager-provider.ts 0.00% 6 Missing ⚠️
...ature/src/lib/cluster-addons/addon-toggle-card.tsx 0.00% 5 Missing ⚠️
...ster-addons/secret-manager/secret-manager-list.tsx 54.54% 3 Missing and 2 partials ⚠️
... and 10 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2718      +/-   ##
===========================================
+ Coverage    45.86%   46.06%   +0.19%     
===========================================
  Files         1164     1191      +27     
  Lines        24497    24812     +315     
  Branches      7196     7304     +108     
===========================================
+ Hits         11236    11430     +194     
- Misses       11299    11400     +101     
- Partials      1962     1982      +20     
Flag Coverage Δ
unittests 46.06% <59.49%> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rmnbrd rmnbrd marked this pull request as ready for review May 29, 2026 15:25
Copilot AI review requested due to automatic review settings May 29, 2026 15:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces cluster-level secret manager add-on settings behind a secret-manager PostHog feature flag, and reorganises cluster Add-ons (KEDA + secret manager) into a new /addons route. Also adds a new shared @qovery/shared/util-clusters lib, a secret manager modal with provider/constraint-aware UX, and bumps qovery-typescript-axios to 1.1.893.

Changes:

  • New settings/addons route exposing the KEDA toggle (moved out of General settings) and a feature-flagged secret manager section with provider-aware add modal and list.
  • New secret-manager-integration-modal + secret-manager-integration-constraints enforcing AWS/GCP automatic-vs-manual rules and OIDC requirements, plus new cluster data-access queries/hooks for provider secrets and associated external secrets.
  • New @qovery/shared/util-clusters lib with cluster/provider/secret-manager helpers, and an InputSelect enhancement to render disabled-option tooltips.

Reviewed changes

Copilot reviewed 47 out of 48 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json, yarn.lock Bump qovery-typescript-axios to 1.1.893 for SecretManagerAccessApi.
tsconfig.base.json Register @qovery/shared/util-clusters path.
libs/shared/util-clusters/** New shared lib: cluster/provider predicates, secret-manager helpers + tests, lint/build config.
libs/shared/interfaces/src/lib/common/value.interface.ts Add optional disabledTooltip to Value.
libs/shared/ui/.../input-select.tsx Wrap option with tooltip + aria-disabled when option is disabled.
libs/domains/cloud-providers/.../use-cloud-providers.ts Add optional suspense param.
libs/domains/clusters/data-access/.../domains-clusters-data-access.ts Add listSecretManagerSecretsFromProvider and listSecretManagerAssociatedServices queries.
libs/domains/clusters/feature/src/lib/hooks/use-secret-manager-*/** New hooks for provider secrets + associated services.
libs/domains/clusters/feature/src/lib/cluster-general-settings/** Remove KEDA toggle (moved to Add-ons) and its test.
libs/domains/clusters/feature/src/lib/cluster-addons/** New AddonToggleCard, SecretManagerList, secret-manager options + tests + barrel exports.
libs/domains/clusters/feature/src/lib/secret-manager-modals/** New integration modal + constraints + types + tests.
libs/domains/clusters/feature/src/index.ts Export new add-ons, modal, and hooks.
apps/console/src/routes/.../settings/addons.tsx New Add-ons route handling KEDA + secret managers, feature-flagged.
apps/console/src/routes/.../settings/route.tsx Add Add-ons sidebar entry for AWS/GCP clusters.
apps/console/src/routeTree.gen.ts Generated route tree updates for /addons.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@RemiBonnet RemiBonnet left a comment

Choose a reason for hiding this comment

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

Thanks @rmnbrd, I added several comments!

  • The modal’s top rounded corners aren’t visible
Screenshot 2026-05-29 at 18 42 39

@@ -0,0 +1,4 @@
import { type SecretManagerAccess } from 'qovery-typescript-axios'

export const isAwsSecretManager = (secretManager: SecretManagerAccess | undefined) =>
Copy link
Copy Markdown
Member

@RemiBonnet RemiBonnet May 29, 2026

Choose a reason for hiding this comment

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

Small question, should isAwsSecretManager also return true for AWS_PARAMETER_STORE?

AWS_PARAMETER_STORE as an AWS option, but this helper only recognizes AWS_SECRET_MANAGER. So if a Parameter Store integration already exists with automatic or STS authentication, it looks like it would not be counted by the AWS exclusivity rules. Is that intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's intentional.

@@ -0,0 +1,12 @@
export { isGcpCluster } from './is-gcp-cluster'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should these helpers stay closer to the cluster domain instead of being introduced under @qovery/shared/util-clusters?

This seems to create a new shared utility library for cluster-specific logic, with helpers like isGcpCluster, isAwsCluster, and several Secret Manager predicates. Some of them are very small, so we end up with quite a few files containing only a few lines, and the cluster rules become spread across many entry points

For services, similar checks live closer to the domain/data-access layer (isHelm, isApplication, etc), so I wonder if we should keep the same pattern here and place these cluster checks under domains/clusters instead. If shared/util-clusters is the intended direction, maybe we should clarify when helpers belong there versus in the domain layer

return (
<div key={manager.id} className={`flex items-center justify-between gap-3 p-3 `}>
<div className="flex min-w-0 flex-1 items-center gap-3">
<Icon name={getSecretManagerProvider(manager)} width={24} height={24} />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you use this kind of function often in your follow‑up PRs?

 getReadableSecretManagerAuth,
 getReadableSecretManagerProvider,
 getSecretManagerProvider

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? What's your question?
Do you wanna know if the follow-up PRs add more similar helper functions or if these ones are re-used later one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They will be re-used, yes:
image

@@ -0,0 +1,6 @@
export type SecretManagerOption = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it necessary to have a separate file for this? It feels like you only use it once

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It will be re-used in follow-up PRs

@rmnbrd
Copy link
Copy Markdown
Contributor Author

rmnbrd commented May 29, 2026

I've taken into account your suggestions and answered your questions.
The main change being the removal of the awkward double save buttons

@rmnbrd rmnbrd requested a review from RemiBonnet May 29, 2026 21:35
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