opendatahub-io / modelmesh-serving

Controller for ModelMesh
Apache License 2.0
3 stars 32 forks source link

bug: Error in odh-model-controller logs on deletion of ModelMesh isvc #260

Closed vaibhavjainwiz closed 11 months ago

vaibhavjainwiz commented 11 months ago

Below error is occuring in odh-model-controller logs on deletion of ModelMesh isvc

2023-12-12T09:36:58Z ERROR controllers.InferenceService Unable to clean up resources {"InferenceService": "example-onnx-mnist", "namespace": "kserve-demo", "error": "failed to delete ServiceAccount: serviceaccounts \"modelmesh-serving-sa\" is forbidden: User \"system:serviceaccount:opendatahub:odh-model-controller\" cannot delete resource \"serviceaccounts\" in API group \"\" in the namespace \"kserve-demo\""}
github.com/opendatahub-io/odh-model-controller/controllers.(*OpenshiftInferenceServiceReconciler).Reconcile
/workspace/controllers/inferenceservice_controller.go:76
vaibhavjainwiz commented 11 months ago

On analysis, I found that odh-model-controller-role ClusterRole which is attached the odh-model-controller pod doesn't have access to delete serviceaccounts.

vaibhavjainwiz commented 11 months ago

closing this issue in favour of https://github.com/opendatahub-io/odh-model-controller/issues/133