headlamp
headlamp copied to clipboard
[RFE] Generate the k8s types automatically
Current situation
We have a subset of the kubernetes resource types declared by us and getting up to date/completed on a need-basis.
Impact
It takes take and it's error-prone to manually declare those types.
Ideal future situation
We should be able to generate those types using the OpenAPI spec.
Implementation options
TBD
The js-client for kubernetes generates the types using the OpenAPI spec, From my initial understanding I think we can import the types directly from it. Refer
Invested more time porting namespaces to client-js types, the amount of changes is very high just for importing the types. I think we should wait and see how the effort on https://github.com/kubernetes-client/javascript/issues/754 goes and migrate to using the client-js library for both networking + types.
https://github.com/kinvolk/headlamp/commit/4cf07178acc939def364f74dfe7626ae1d9000c7
cc: @joaquimrocha
Let's pause this for now until we have a better understanding of what makes sense to the project.