Skip to content

feat: support selective yaml service resource deletion#4729

Open
huanghongbo-hhb wants to merge 1 commit into
koderover:mainfrom
huanghongbo-hhb:feat/yaml-service-delete-selected-resources
Open

feat: support selective yaml service resource deletion#4729
huanghongbo-hhb wants to merge 1 commit into
koderover:mainfrom
huanghongbo-hhb:feat/yaml-service-delete-selected-resources

Conversation

@huanghongbo-hhb

@huanghongbo-hhb huanghongbo-hhb commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • support listing current k8s yaml service resources before deleting a service
  • support deleting only selected resources while removing the service from the environment

Why

  • the delete-service flow needs to let users retain specific resources instead of always deleting the full applied manifest

Main Changes

  • add an environment API to list the current applied resources of a k8s yaml service
  • extend the delete service request to accept delete_resources grouped by service name
  • filter the current applied yaml down to only the selected resources before reusing the existing uninstall path
  • keep existing OpenAPI and legacy UI behavior unchanged when delete_resources is not provided
  • add focused tests for resource parsing and yaml filtering behavior

Risk / Compatibility

  • low risk for existing callers because the old delete behavior is preserved when delete_resources is omitted
  • when the caller explicitly passes an empty resource list for a service, the service record is removed while its k8s resources are retained intentionally

Test

  • go test ./pkg/microservice/aslan/core/environment/handler ./pkg/microservice/aslan/core/environment/service -run '^$' -count=0

Contact


This change is Reviewable

@huanghongbo-hhb huanghongbo-hhb marked this pull request as ready for review May 29, 2026 08:47
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.

1 participant