kube-rs / kopium

Kubernetes OPenapI UnMangler
Apache License 2.0
113 stars 21 forks source link

add support for standard Condition APIs #203

Closed aryan9600 closed 8 months ago

aryan9600 commented 8 months ago

Detect the presence of a Conditions object in a schema and use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition if present. Introduce a new flag --no-condition which allows revering back to the old behavior of generating a custom Condition API for each instance.

Furthermore, introduce analyzer::Config which allows for customizing the behavior of the analyze function.

Fixes #199

clux commented 8 months ago

wow, this is a huge change. it passes tests which is a great sign! thanks a lot.

going to try to cross-reference the code with main manually for a little while (because diff is not great with indent and code change at the same time). i'll put some comments on as i go along. if there are any particular parts of code that you would like to call attention to feel free to put any annotations/comments on the PR.

clux commented 8 months ago

if you don't mind i'll push a commit on top of this

clux commented 8 months ago

added 3 4 commits to https://github.com/kube-rs/kopium/pull/204 - if you are happy with these feel free to cherry-pick them in, and i'm happy to merge :-)

clux commented 8 months ago

needs a just fmt + plus cherry-pick https://github.com/kube-rs/kopium/pull/204/commits/f8286ca319ce5902d538c9cf5d3baf94f085f970 for integration tests