kusion icon indicating copy to clipboard operation
kusion copied to clipboard

Feat: Fine-Grained Resource Dependency Analysis

Open ruquanzhao opened this issue 7 months ago • 0 comments

What would you like to be added?

Fine-Grained Kubernetes Resource Dependency Analysis

Why is this needed?

Kusion initially used ordered kinds to determine the dependency order between Kubernetes resources. This PR changed the chain dependency model to a graph-based dependency model, but it still does not meet our requirements.

The issue is that dependency based on resource kinds cannot fully capture all scenarios. For example, a Deployment may use a ConfigMap, but an unreferenced ConfigMap might still be marked as a dependency of the Deployment, preventing the deletion of the isolated, unreferenced ConfigMap.

Therefore, we need a method that can analyze true resource-level dependencies directly from the spec, rather than relying on coarse-grained kind-based dependencies.

Related Issues and Prs(Let's handle these problems in one way!)

issues: https://github.com/KusionStack/kusion/issues/511 https://github.com/KusionStack/kusion/issues/1402 https://github.com/KusionStack/kusion/issues/1404

prs: https://github.com/KusionStack/kusion/pull/1406 https://github.com/KusionStack/kusion-module-framework/pull/41

ruquanzhao avatar Jun 19 '25 03:06 ruquanzhao