Skip to content

fix(applaunchpad): preserve instance ownership for recreated resources - #7188

Open
PRINCEofAsgd wants to merge 1 commit into
labring:mainfrom
PRINCEofAsgd:fix/applaunchpad-recreated-resource-ownerrefs
Open

fix(applaunchpad): preserve instance ownership for recreated resources#7188
PRINCEofAsgd wants to merge 1 commit into
labring:mainfrom
PRINCEofAsgd:fix/applaunchpad-recreated-resource-ownerrefs

Conversation

@PRINCEofAsgd

Copy link
Copy Markdown

What does this PR do?

  • Preserves App Store Instance ownership when App Launchpad recreates Services, Ingresses, and other dependent resources.
  • Inherits the cloud.sealos.io/deploy-on-sealos label from the existing Deployment or StatefulSet.
  • Treats Kubernetes 404 NotFound responses during deletion as success, making resource deletion idempotent.
  • Adds regression tests for Deployment- and StatefulSet-backed applications, standalone Launchpad applications, and already garbage-collected resources.

Why is this needed?

When an App Store application port is removed and recreated through App Launchpad, the newly created Service or Ingress loses the ownership metadata established by the App Store Instance.

Deleting the Instance then removes the original workload resources, but the recreated network resources can remain in the namespace.

During validation, attaching recreated resources directly to the Deployment or StatefulSet exposed another lifecycle issue: StatefulSets can be deleted and recreated during updates, causing Kubernetes to garbage-collect the Service before the explicit delete operation runs. This produced a false 500 response even though the Service had already been deleted.

This PR therefore inherits the stable App Store Instance ownerReference instead of making the replaceable workload the ownership root.

Fixes #7187

How was this tested?

Automated tests

  • App Launchpad unit tests: 171 passed
  • TypeScript type check: passed
  • ESLint: passed with existing React Hook warnings only
  • Prettier and pre-commit checks: passed

Manual verification

  1. Installed an application from the Sealos App Store.
  2. Recreated a public port through the locally running App Launchpad.
  3. Deleted the application from the App Store.
  4. Confirmed that the recreated network Service was garbage-collected.
  5. Removed a recreated port through App Launchpad and saved the application.
  6. Confirmed that the update returned successfully and the Service was removed.

@PRINCEofAsgd
PRINCEofAsgd requested a review from a team as a code owner August 7, 2026 09:54
@cla-assistant

cla-assistant Bot commented Aug 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: App Launchpad leaves recreated network resources after deleting an App Store instance on main

1 participant