headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

[RFE] Generate the k8s types automatically

Open joaquimrocha opened this issue 2 years ago • 2 comments

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

joaquimrocha avatar Jun 01 '22 20:06 joaquimrocha

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

yolossn avatar Jun 06 '22 11:06 yolossn

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

yolossn avatar Sep 14 '22 04:09 yolossn

Let's pause this for now until we have a better understanding of what makes sense to the project.

joaquimrocha avatar Sep 28 '22 10:09 joaquimrocha