Open kolbe opened 4 years ago
Better validate CRD before applying it to the cluster.
That's a good idea.
@Yisaer
we can do semantic validation in the controller or ValidatingAdmission. The validation code can be reused, and it is better to do it in the ValidatingAdmission, because cr will not be saved to etcd, if we do it in the controller, we need to report warnning event. wdyt?
ValidationAdmission is a good idea. ValidationAdmission do help us to reduce the panic before saving in the etcd, we still need to handle the situation when we meet panic in controller-manager. @zjj2wry
In fact, we do have a validation webhook for pingcap resources (tidbcluster), but now it covered little range for them.
we still need to handle the situation when we meet panic in controller-manager
agreed, because ValidationAdmission is an optional component, I think it is also needed in the controller manager
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days
/assign
Feature Request
Is your feature request related to a problem? Please describe:
If I have applied a malformed TidbMonitor CRD to the cluster, tidb-controller-manager does not handle it very well:
Describe the feature you'd like:
I'd like more information about where in the CRD the problem is, and I'd like the problem to be handled more cleanly rather than causing a crash!
Describe alternatives you've considered:
Better validate CRD before applying it to the cluster.
Teachability, Documentation, Adoption, Migration Strategy: