4934 Commits
Author SHA1 Message Date
cuisongliu ff4bf4f850 refactor(frontend): clean up extracted app references (#7360)
refactor(frontend)!: clean up extracted app references

Stop pulling and installing the extracted AppLaunchpad and DBProvider frontends, and remove their unused installer TLS setup. Remove the obsolete Template-specific Docker layer and update development examples and independent app repository links.

BREAKING CHANGE: install-v2.sh no longer installs AppLaunchpad or DBProvider. Install these applications from their sealos-apps repositories. Monitoring services and Desktop integrations remain available.

Signed-off-by: cuisongliu <cuisongliu@qq.com>
2026-10-15 15:14:12 +08:00
Alex Lee fc000c1dc1 refactor(applaunchpad): remove extracted application code (#7352)
* refactor(applaunchpad): remove extracted application code

* chore(frontend): clean up applaunchpad extraction leftovers
2026-10-14 15:11:30 +08:00
Alex Lee e819ef6de7 refactor(frontend): remove DBProvider frontend (#7354)
* refactor(frontend): remove DBProvider frontend

Signed-off-by: Alex Lee <3076438032@qq.com>

* refactor(frontend): remove DBProvider integrations

* fix(frontend): retain DBProvider integrations

---------

Signed-off-by: Alex Lee <3076438032@qq.com>
2026-10-14 12:04:43 +08:00
jingyang 74bf2df06c fix(desktop): relay Brain analytics with Desktop identity (#7356)
* fix(desktop): relay Brain analytics with Desktop identity

* fix(desktop): narrow analytics template values for TypeScript 5.2
2026-10-12 15:02:21 +08:00
Alex Lee 83d1278086 fix(admission): allow ns-admin to correct resource creators (#7349)
* fix(admission): allow ns-admin to correct resource creators

* style(admission): format creator tests for CI golines checks
2026-10-09 11:47:13 +08:00
cuisongliu 36ad4110d3 fix(Kubefile): disable resource creator webhook by default (#7347)
Signed-off-by: cuisongliu <cuisongliu@qq.com>
2026-10-09 11:26:27 +08:00
Alex Lee fa0fbc7124 feat(admission): record and protect resource creator annotations (#7346)
feat(account): record and protect resource creator annotations (#7337)

(cherry picked from commit c97ead463c)
2026-10-09 11:22:04 +08:00
Alex Lee 9ca3fef3c1 refactor(template): extract app store from monorepo (#7317)
refactor(template)!: remove extracted app store

BREAKING CHANGE: Sealos no longer builds or installs the Template app store; use sealos-apps/template.
2026-10-08 18:22:09 +08:00
zijiren 68bfa4bce9 fix(lifecycle): stop distributing admin kubeconfigs to nodes (#7335)
* security: stop distributing admin kubeconfigs to nodes

Signed-off-by: zijiren233 <pyh1670605849@gmail.com>

* fix: retain runtime test helpers after kubeconfig cleanup

Signed-off-by: zijiren233 <pyh1670605849@gmail.com>

* fix: keep admin kubeconfig on bootstrap master

Signed-off-by: zijiren233 <pyh1670605849@gmail.com>

---------

Signed-off-by: zijiren233 <pyh1670605849@gmail.com>
2026-10-08 16:07:04 +08:00
jingyang d92ef316ba fix(desktop): track website token login completion (#7340) 2026-09-28 17:23:02 +08:00
jingyang f945413f2b feat(desktop): support OAuth authorization code flow with PKCE (#7333)
* feature: add native OAuth authorization code flow with PKCE

Signed-off-by: zjy365 <3161362058@qq.com>

* fix(desktop): resume current OAuth login and redirect grant errors

Signed-off-by: zjy365 <3161362058@qq.com>

---------

Signed-off-by: zjy365 <3161362058@qq.com>
2026-09-28 11:52:36 +08:00
jingyang a6690be270 fix(applaunchpad): restore HPA spec verbatim on resume (#7330)
fix(applaunchpad): restore HPA spec verbatim on resume to prevent double ×10 and wrong workload kind

Pause now captures the full live HPA spec and stores it in the pause
annotation. Resume re-applies that spec unchanged, eliminating:

- CPU target doubling (50% → 500%) caused by re-multiplying the already
  ×10 averageUtilization through json2HPA on every start.
- HPA pointing at the wrong workload kind (StatefulSet instead of
  Deployment) because the restore path never passed storeList.
- Elastic apps starting at 1 replica instead of the saved minReplicas.
- Repeat-pause wiping out the restore data captured by the first pause.

All three pause/start paths (pauseApp/startApp, updateReplica PauseApp/
StartApp, and updateAppResources replicas branches) now share the same
pauseResume helpers, so manual and scheduled operations behave identically.

Legacy annotations (pre-fix {target,value} format) are still handled:
restoreHPAYaml divides the historically over-stored value by 10 and
derives the correct storeList from the live app.kind.
2026-09-17 17:22:43 +08:00
jingyang ab6788b8c4 fix(applaunchpad): preserve service names when toggling HTTP access (#7328) 2026-09-14 17:29:33 +08:00
Jiahui 1e97ffc475 fix(account): monitor admin workspace objectstorage (#7324)
fix monitor admin workspace objectstorage
2026-09-12 16:02:20 +08:00
zijirenandCopilot Autofix powered by AI 95c027dbcb fix(resources): bind monitor lifecycle to manager leadership (#7315)
* fix(resources): bind monitor lifecycle to manager leadership

* Improve error handling for cache synchronization

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix(resources): use errors.New for cache sync failure

* fix(resources): handle canceled initialization and bound database cleanup

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-08 10:37:09 +08:00
zijiren 317ed32925 fix(account): run workspace tasks only on the elected leader (#7314)
* fix(account): run workspace tasks only on the elected leader

* fix(account): use structured logging for subscription debt errors
2026-09-08 10:10:53 +08:00
zijirenandCopilot Autofix powered by AI 30669519c4 fix(account): close payment watches and await worker shutdown (#7304)
* fix(account): close payment watches and await worker shutdown

* style: format controller regression tests

* Change error message for payment list failure

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-07 11:43:35 +08:00
zijiren dc1fa3a853 fix(resources): handle completed pods without a start time (#7305)
* fix(resources): handle completed pods without a start time

* style: format resource monitoring regression test
2026-09-07 11:39:03 +08:00
Yun Pan 86ee123c1d perf(account): add startup stage timing logs (#7302)
* perf(account): add startup stage timing logs

* fix(account): log startup stage failures as errors
2026-09-04 15:48:29 +08:00
Yun Pan 2029b9be13 fix(account): prevent consumption amount double counting (#7301)
* fix(account): prevent consumption amount double counting

* docs(account): clarify consumption aggregation logic

* docs(account): add consumption query examples

* test(account): add anonymized billing runtime fixture

* style(account): format billing runtime fixture
2026-09-04 15:05:06 +08:00
zijiren 463143b2c0 ci(test): run Go tests with race detector (#7299)
* ci: run Go tests with race detector

* ci: use standard race test targets

* ci: avoid coverage during controller race tests

* test: document trusted external request targets

* ci: fold account runtime tests into unit tests

* test: always run account testcontainers tests
2026-09-04 14:27:50 +08:00
Alex Lee 9d02df00c4 chore(terminal): remove migrated terminal module (#7242)
* chore: remove extracted terminal module

* chore: remove stale terminal whitelist reference

* fix(ci): remove deleted terminal build targets

* fix(account): preserve terminal debt webhook whitelist

* fix(account): restore unchanged webhook files
2026-09-03 22:50:18 +08:00
Yun Pan bcb6870bde fix(account): expose startup and readiness probes (#7293)
* fix(account): add startup probe for slow startup

* fix(account): expose startup and readiness probes

* fix(account): wait for cache sync before readiness

* fix(account): remove redundant test variable copy

* fix(account): satisfy controller lint

* fix(account): run readiness marker on every replica
2026-09-03 19:39:09 +08:00
zijiren 17aebfa531 fix(account): prevent stale webhook balance cache from being renewed (#7296)
fix(account): prevent webhook cache from extending stale balance
2026-09-03 18:04:38 +08:00
Yun Pan da2fd86171 perf(account): optimize consumption amount aggregation (#7294)
* perf(account): optimize consumption amount aggregation

* fix(account): correct consumption app type filtering
2026-09-03 17:23:15 +08:00
Yun Pan e0013e883b fix(account): load admin JWT secret in legacy deployment (#7287) 2026-09-03 12:01:30 +08:00
jingyang 86c24b6619 fix(costcenter): render billing per region (#7248)
fix(costcenter): render region billing independently

Prevent a slow or failed region consumption request from blocking all billing cards. Show successful regions immediately, mark failed regions as unavailable, and allow retrying an individual region.
2026-09-02 17:36:34 +08:00
Yun Pan e99acfb765 perf(account): optimize workspace consumption aggregation (#7254)
* perf(account): optimize workspace consumption aggregation

* perf(account): address workspace consumption review feedback

* style(account): satisfy golangci-lint formatting

* perf(account): simplify workspace consumption aggregation

* fix(account): avoid duplicate direct workspace totals

* fix(account): preserve settled subconsumption totals

* test(account): add workspace consumption MongoDB runtime test

* test(account): use AVX-compatible MongoDB image

* test(account): benchmark workspace consumption query

* ci(account): require MongoDB runtime test in CI

* fix(ci): resolve semgrep and account lint failures
2026-09-02 17:01:23 +08:00
Yun Pan b242ab75bc feat(account): add admin notification recipients API (#7247)
* feat(account): add admin notification recipients API

* fix(account): validate notification namespaces

* fix(account): handle ambiguous notification owners

* fix(account): satisfy golangci-lint
2026-09-02 12:02:35 +08:00
zijiren 6c78169a8f refactor(user): reduce controller memory and harden namespace security (#7273)
* fix(user): make admin namespace privilege configurable

* fix(user): enforce PSA for orphan namespaces

* fix(user): clean up disabled admin privilege

* refactor(user): simplify startup reconciliation

* fix(user): preserve legacy bound secret type

* fix(user): skip kubeconfig refresh for legacy status

* fix(user): retry failed kubeconfig sync

* fix(user): persist kubeconfig sync condition

* fix(user): retry failed resource synchronization

* refactor(user): reduce startup cache memory

* fix(user): wait for user count cache before reconcile

* refactor(user): compact RBAC cache projections

* perf(user): avoid copying cached kubeconfig

* fix(user): schedule kubeconfig refresh by persisted deadline

* refactor(user): expose queue priority to event handler

* fix(user): harden controller lifecycle and requests

* fix(user): cancel service account sync on shutdown

* perf(user): filter pre-start child create events

* docs(user): note streaming watch optimization

* fix(user): harden event-driven reconciliation

* chore(user): configure admin cluster admin setting

* docs(user): clarify effective expiration minimum
2026-09-01 11:12:47 +08:00
cuisongliu 31d9e1dcc8 feat(app): support version field in App CRD (#7278) 2026-08-31 10:48:52 +08:00
zijiren 5d0ecb4698 fix(account): allow patching user annotations (#7275) 2026-08-28 18:44:58 +08:00
jingyang 2586ffd27a fix(client-sdk): target direct parent frame (#7276)
* fix(client-sdk): target direct parent frame

* build(client-sdk): bump package version to 0.1.21

* build(client-sdk): bump package version to 0.1.23
2026-08-28 16:46:35 +08:00
jingyang 70ac4e999b fix(frontend): guard unknown workspace quota types (#7260)
* fix(frontend): guard unknown workspace quota types

Ignore quota resources that an older frontend bundle does not recognize and make quota formatting resilient to new SDK fields. Add a regression test for pod and unknown quota types.

* build(client-sdk): bump package version to 0.1.22
2026-08-28 16:09:03 +08:00
Phil SuandClaude Fable 5 553ef241a9 feat(desktop): suppress the dock while Brain is the topmost window (#7267)
While Brain (system-brain) is the topmost non-minimized window, AppDock
(collapse pill included, zIndex 1000) no longer renders, so nothing
overlays the Brain iframe. The dock returns as soon as Brain loses the
top layer, is minimized, or is closed. Other apps and the floating-button
shape are unaffected.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 15:44:19 +08:00
zijiren d859f43238 fix(account): enforce suspended namespace webhook (#7266)
* fix(account): enforce suspended namespace webhook

* style(account): format webhook tests
2026-08-28 10:44:37 +08:00
zijiren b3dcab4119 perf(account): reduce controller cache memory usage (#7255)
* perf(account): reduce controller cache memory usage

* test(account): satisfy cache test lint checks

* perf(account): limit pod informer cache

* perf(account): cache projected pod fields

* style(account): format pod cache test
2026-08-27 16:51:09 +08:00
zijiren 91c24c7463 perf(resources): reduce controller cache memory (#7257)
* perf(resources): reduce controller cache memory

* fix(resources): wait for projected cache sync
2026-08-27 16:27:40 +08:00
zijiren 813b027777 perf(license): reduce controller cache memory (#7263) 2026-08-27 16:25:10 +08:00
zijiren a2a338dbcf perf(user): reduce controller cache memory usage (#7256)
* perf(user): reduce controller cache memory

* fix(user): resolve GVK for direct-read finalizers

* perf(user): cache projected user fields

* perf(user): project cached metadata fields

* style(user): satisfy cache lint checks
2026-08-27 16:22:19 +08:00
cuisongliu 8526c3a030 fix(clusterrole): expand permissions for kube-system namespace (#7264)
Signed-off-by: cuisongliu <cuisongliu@qq.com>
2026-08-26 22:14:59 +08:00
cuisongliu 7afc77ef3d fix(clusterrole): expand permissions for kube-system namespace (#7261)
Signed-off-by: cuisongliu <cuisongliu@qq.com>
2026-08-26 19:51:16 +08:00
Yun Pan beea1e56cb feat(account): expose admin account read APIs (#7220)
* feat(account): expose admin account read APIs

* fix(account): satisfy golangci-lint

* fix(account): satisfy golines formatting

* fix(account): apply golangci-lint formatting

* fix(account): address review feedback

* feat(account): isolate admin jwt authentication

* test(account): cover property reload admin auth

* fix(account): satisfy context-aware request lint

* fix(account): address admin auth review feedback
2026-08-21 15:05:38 +08:00
jingyang b53b60d7bb feat(desktop): route GitHub repo deep-links to Brain /deploy like templates (#7244)
The official template one-click deploy lands in Brain via the OAuth page's
openBrainTemplateDeploy branch: `/oauth?login=github&openapp=system-brain&
templateName=...&templateForm=...` becomes an autolaunch for the Brain
`/deploy` route. GitHub one-click deploy (Brain #283) needs the same entry
point, but githubRepo/autoDeploy were silently ignored.

Add the symmetric openBrainGithubDeploy branch: when openapp is system-brain
and githubRepo is present, autolaunch Brain `/deploy?githubRepo=...&
autoDeploy=1` so the Brain GitHub deployer opens with the repo pre-filled and
auto-deploys once when autoDeploy=1. Works for both the token-login and
already-logged-in paths; anything malformed falls through to normal openapp
handling.
2026-08-21 14:54:33 +08:00
Yun Pan c82addbaa2 fix(user): avoid full User objects in webhook validation (#7240)
* fix(user): avoid full user lists in webhook validation

* fix(user): satisfy golangci-lint

* fix(user): use informer-backed user count

* style(user): satisfy formatter checks

* fix(user): wait for informer event sync
2026-08-21 11:18:19 +08:00
nightwhite 228e59250c feat(frontend): add Rybbit analytics integration with event forwarding (#7231)
* feat(frontend): add Rybbit analytics integration with event forwarding

Integrate self-hosted Rybbit analytics as an additional sink alongside
the existing GTM pipeline, which remains fully unchanged:

- Add RybbitScript component to @sealos/gtm, driven by the
  NEXT_PUBLIC_RYBBIT_HOST / NEXT_PUBLIC_RYBBIT_SITE_ID env vars;
  loads nothing when unset
- Forward all track() events to window.rybbit.event() in addition to
  dataLayer; object props are JSON-serialized and truncated at 512
  chars per value (Rybbit caps properties at 2KB, primitives only)
- Mount RybbitScript in desktop / applaunchpad / dbprovider / template;
  dbprovider and template get an analytics script for the first time
  (their track() events previously had no consumer)
- Document the env vars in desktop/.env.template

Verified: @sealos/gtm, desktop, dbprovider and template production
builds pass. The applaunchpad build failure is a pre-existing echarts
SSR issue on main, confirmed unrelated via a stash control test.

* refactor(frontend): drive Rybbit config from runtime backend config

Address review feedback: replace build-time NEXT_PUBLIC_* env vars with
runtime configuration delivered by each app's existing config channel,
symmetric with how gtmId flows today. Config changes no longer require
a rebuild and can be toggled per environment at deploy time.

- RybbitScript is now props-driven (host / siteId); empty host or
  siteId disables it. No process.env reads remain
- desktop: add layoutConfig.rybbitHost / rybbitSiteId (type, client
  defaults, Helm values + configmap), passed through at the mount point
- applaunchpad: add analytics.rybbit.{host,siteId} to the config
  schemas (server + client), example yaml and chart configmap; read in
  getInitialProps alongside the existing gtm fields
- dbprovider / template: add optional analytics.rybbit section to the
  config schemas, example yamls, chart configmaps and values; read in
  getInitialProps and pass to the mount point
- New analytics sections are optional in the zod schemas so existing
  deployments keep working when only the image is upgraded
- Drop the NEXT_PUBLIC_RYBBIT_* entries from desktop/.env.template;
  document rybbitHost/rybbitSiteId in the Helm values guides

Verified: @sealos/gtm builds; desktop production build passes;
dbprovider / template / applaunchpad compile successfully
(applaunchpad still stops at the pre-existing echarts SSR issue on
/app/detail/monitor, unchanged from main).

* chore(desktop): restore .env.template to drop unrelated diff

* fix(frontend): buffer early Rybbit events and allowlist host in provider CSP

Review follow-up for the Rybbit integration:

- Queue events fired before the Rybbit script finishes loading and
  flush them from RybbitScript onLoad, mirroring the dataLayer buffer
  the GTM path already has
- Append the configured rybbitHost to script-src in both CSP
  annotations (nginx snippet + higress) of the dbprovider/template/
  applaunchpad ingresses, so /api/script.js is not blocked when the
  integration is enabled; unset values render the CSP unchanged
- Wire applaunchpad rybbitHost/rybbitSiteId through values instead of
  hardcoded empty strings in the configmap, matching dbprovider and
  template (the config channel was previously broken)
2026-08-20 17:54:57 +08:00
jingyang c1ce22d06f fix(desktop): expose pod workspace quota (#7209)
* fix(desktop): expose pod workspace quota

* fix(providers): support pod quota in provider quota boxes

Adapt dbprovider, template and applaunchpad QuotaBoxes to render the
new pod workspace quota item: add sourceMap color / icon entries and
missing i18n keys, aligning zh label with the shared quota-dialog.
2026-08-20 11:37:26 +08:00
jingyang 03425c6a7c fix(costcenter): embed Alipay cashier page via iframe (#7237)
* fix(costcenter): embed Alipay cashier page via iframe

The Alipay payment URL from TradePagePay is a signed gateway URL over
900 characters long, which cannot be scanned as a QR code. Switch to
qr_pay_mode=4 (order code mode) so Alipay renders the official cashier
page, return its auto-submitting form HTML as the payment code, and
embed it in the frontend via an iframe. QR code rendering remains for
legacy data.

* refactor(pay): restore original alipay comments

* refactor(costcenter): load Alipay cashier page via iframe src
2026-08-19 17:56:09 +08:00
Carson Yang 3cffcaacd3 fix(desktop): preserve marketing attribution through Cloud auth (#7217)
* feat(marketing): propagate attribution through desktop auth

* fix(desktop): complete attribution handoff

* fix(desktop): support persisted attribution sessions

* fix(desktop): close attribution lifecycle gaps

* fix(analytics): remove duplicate login success events
2026-08-19 10:19:31 +08:00
Yun Pan 95c67c41eb fix(account): wait for all deletion workers (#7232) 2026-08-18 15:21:49 +08:00