kubewharf / katalyst-core

Katalyst aims to provide a universal solution to help improve resource utilization and optimize the overall costs in the cloud. This is the core components in Katalyst system, including multiple agents and centralized components
Apache License 2.0
420 stars 103 forks source link

Refactor some methods of node webhook #577

Open googs1025 opened 4 months ago

googs1025 commented 4 months ago

What happened?

When I was using katalyst recently, I found that there were some duplicate codes in the webhook code. I wanted to do a small refactoring and simplify some codes. like this https://github.com/kubewharf/katalyst-core/blob/main/pkg/webhook/mutating/node/allocatable_mutator.go#L66 https://github.com/kubewharf/katalyst-core/blob/main/pkg/webhook/mutating/node/allocatable_mutator.go#L121

googs1025 commented 4 months ago

/assign