kaito icon indicating copy to clipboard operation
kaito copied to clipboard

Should check config existence in reconciler loop rather than in validation webhook.

Open MartinForReal opened this issue 8 months ago • 2 comments

Is your feature request related to a problem? Please describe. The webhook raised another api call to check if the configmap exists. The cm may change and validating hook will not block requests if cm is deleted later. if cm has been verified in reconciler loop, we should remove these validations. Describe the solution you'd like Should check configmap existence in reconciler loop, set ownerReference in configmap and if customer updated configmap, the reconcile func will be triggered.

Describe alternatives you've considered

Additional context Also kubeclient package can be removed.

preset-tunning invoked https://github.com/kaito-project/kaito/blob/eff7a7017b5b904979bc662e4fde89d01f5f9cf3/pkg/utils/resources/resources.go#L118-L175

MartinForReal avatar Apr 28 '25 16:04 MartinForReal

@MartinForReal Would you like to provide detailed information about this webhook?

rambohe-ch avatar Apr 29 '25 12:04 rambohe-ch

The webhook here sends a get request to check if cm exists https://github.com/kaito-project/kaito/blob/main/api/v1alpha1/tuning_config_validation.go

MartinForReal avatar May 13 '25 06:05 MartinForReal