KusionStack / KusionStack/kusion
Feat: Fine-Grained Resource Dependency Analysis
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 108
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
### 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](https://github.com/KusionStack/kusion-module-framework/pull/41) 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
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reviewing the related issues and pull requests, then inspect the existing kind-based and graph-based dependency model. Done means the design and implementation can identify true resource-level dependencies from resource specs rather than coarse resource kinds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100