Open jfroche opened 4 years ago
If I recall correctly, starting with the v4, you need to patch the dhall-kubernetes-generator with https://github.com/dhall-lang/dhall-kubernetes/pull/120 instead of the patch included in the current README. It would be interesting to document how to generate a binding from a running cluster, e.g. using git fetch origin refs/pull/120/merge && git checkout FETCH_HEAD
instead of git am -3
. However I don't think we should commit the resulting package in this project as it's not reproducible without the cluster. Moreover, I would rather help creating the openapi-to-dhall tool, which should work out of the box with the /openapi/v2
content.
I also investigated generating the openapi-spec file with the sources from https://github.com/openshift/openshift-apiserver using the kube-openapi tool. That would be ideal because we could automate the generation of per version package. However this seems to require quite a bit of work to get a valid openapi-spec.
I was wondering if you would be ok to generate the types based on the openapi schema provided by the api server in openshift ? And version the generated types, just like they do in k8s.
We do
oc get --raw /openapi/v2 > openshift-openapi-spec.json
to get the openapi spec for our cluster (4.4.3)I have made a Makefile based on your nice readme:
I can commit/pull request this if you think it would be interesting