openyurtio / openyurt

OpenYurt - Extending your native Kubernetes to edge(project under CNCF)
https://openyurt.io
Apache License 2.0
1.69k stars 398 forks source link

[feature request] Avoid calling functions under package k8s.io/kubernetes, move it to util #1967

Closed vie-serendipity closed 5 months ago

vie-serendipity commented 5 months ago

What would you like to be added: SortControllerRevisions is called dircetly in the current implementation. It should be moved to pkg/util/kebernetes. https://github.com/openyurtio/openyurt/blob/34b14ccadfe26b8956144d21ec62a79a3aef1760/pkg/yurtmanager/controller/yurtappset/revision.go#L96

Why is this needed: It is not recommended to call functions under package k8s.io/kubernetes. It would be better to call them by defining new functions in the util directory.

others /kind feature

huangchenzhao commented 5 months ago

/assign @huangchenzhao