Comments (7)
Yes, please do that.
from k8s-openapi.
From a cursory glance at the spec, at least these things will need to change / become flexible:
-
More
SupportedVersion
s for OpenShift versions -
Some definitions are under a new
com.github.openshift.api
namespace. This would need to be collapsed to::openshift
likeio.k8s
is collapsed to::
right now. -
The
x-kubernetes-group-version-kind
annotations on thecom.github.openshift.api
definitions are strange. There are two of them for each definition with different group names. It might trip up the code generator. -
Other things?
That said, I'm not sure I want to have OpenShift bindings in the k8s-openapi
crate, or even in this git repo, though I'm open to being convinced otherwise. The main reason is that I wouldn't test the OpenShift bindings in any way, so I think it'd be better if they were maintained by someone who cares about them.
It might work to make the code generator flexible enough to support it, but the bindings can live in a separate OpenShift-specific bindings repo (not maintained by me) that references the code generator from this repo through a git submodule reference or something.
If you're up to it, could you make a PR / fork with all the changes needed to generate valid bindings for OpenShift specs? Once I have a list of all the things that need to change in the code generator, I can make a more informed decision.
from k8s-openapi.
I will have a look at it in the following days. I would definitely try to maintain them and set up some tests so you feel confident having them in the repo. Due to the non-modularity in k8s-openapi-users I would prefer the bindings to be in k8s-openapi for now, but let's talk when I have a proof of concept.
from k8s-openapi.
It might work to make the code generator flexible enough to support it, but the bindings can live in a separate OpenShift-specific bindings repo (not maintained by me) that references the code generator from this repo through a git submodule reference or something.
v0.5.0 modularized most of the codegen into a library crate since it needs to be shared by the original code generator as well as the new proc macro crate. This should make it easier for out-of-tree bindings crates.
from k8s-openapi.
I started to work on this at https://github.com/ctron/openshift-openapi … I had to make a few tweaks to the k8s-openapi generator, see: https://github.com/ctron/k8s-openapi/tree/feature/openshift_api_1
But I was hoping to bring back the requires features of the code generator to k8s-openapi.
from k8s-openapi.
I'll look at it this weekend.
from k8s-openapi.
@Arnavion I can open a draft PR if you like?! I simply didn't want to throw that at you, because I am not sure that I would merge that in the current state 😁 But I guess it might a good starting point for discussing.
from k8s-openapi.
Related Issues (20)
- Consider extending the crate with merge functionality HOT 7
- Documentation snippet about kubernetes detection is not working as expected HOT 4
- Improve Name and Namespace optionality HOT 7
- `apimachinery::pkg::api::resource::Quantity` compatibility with Go HOT 2
- i32 for port number HOT 5
- `MicroTime` can be `null` HOT 6
- Add `latest` and `earliest` version features that track highest and lowest supported version HOT 1
- Can't find `meta/v1/Duration` HOT 2
- `k8s_openapi::ListResponse` should be serializable HOT 2
- release with v1.27 HOT 3
- v1.28.0
- Looking for example on how to use k8s_openapi::api::core::v1::Event::create function HOT 1
- ServiceSpec not creating headless service when cluster_ip set to None HOT 4
- Size of generated code HOT 7
- Tracking issue for bringing back API operations-related code if there is demand HOT 6
- about k8s-openapi features upgrade question HOT 4
- Comparison of elements is too strict HOT 2
- int-or-string parameters are typed out with mismatched "type" property HOT 2
- Namespaces are not Serializing HOT 4
- Plans to Support Builder Pattern in Kube.rs? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k8s-openapi.