pytorch-operator icon indicating copy to clipboard operation
pytorch-operator copied to clipboard

Implement "earlier" resource validation

Open johanfleury opened this issue 5 years ago • 3 comments

Hi

Currently, when a new PytorchJob is created the Kubernetes API will only check if it matches the schema defined in the CRD, but the "real" validation is done in pkg/apis/pytorch/validation/validation.go.

This is too late in the process as the resrouce will already be created by the API

A use-case for catching errors early would be deployment using a CI/CD tool where you wan your pipeline to fail if it can't deploy.

For example, cert-manager is doing resource validation using a webhook: https://docs.cert-manager.io/en/latest/getting-started/webhook.html.

johanfleury avatar Jun 26 '19 16:06 johanfleury