Git Product home page Git Product logo

Comments (6)

anthcp-infocom avatar anthcp-infocom commented on June 3, 2024

I managed to get OpenShift Routes working by adding the Route components from the openapi-v3.json to your original open API file and rebuilding etc... However, to get the get_yaml() function to work properly on my OSX Mac, I had to use PyYaml as I was getting dictionary's listed in the list values as {} etc... An example of the routes...
y = Route(
spec=RouteSpec(
to=RouteTargetReference(kind="Service", name="service-name"),
host="www.example.com",
path="/test",
),
apiVersion="v1",
kind="Route",
metadata=ObjectMeta(name="route-unsecured"),
)

from hikaru.

haxsaw avatar haxsaw commented on June 3, 2024

I hadn't considered OpenShift support; I've currently been working on connecting Hikaru to the Kubernetes Python client so sending requests is a little more seamless, and was planning subsequently to improve the API in Hikaru to offer a CRUD-like experience. This is an interesting notion though, but I think the build system will need some work as there are lots of artefacts that reflect the inconsistencies in the Kubernetes swagger file. I'm happy for you to leave this as an open request, but I can't make any representations at the moment.

from hikaru.

anthcp-infocom avatar anthcp-infocom commented on June 3, 2024

Hi, being inspired by what you have done, I managed to cobble a Openshift 3.11 version which I have called Pydalio... It uses Pydantic and seems to work fine for a pre-alpha and is pretty basic at the moment... Its at https://github.com/anthcp-infocom/Pydalio. I am using it at work at the moment and have integrated it into the openshift-K8s rest client...

from hikaru.

haxsaw avatar haxsaw commented on June 3, 2024

I just came back from having a look at Pydalio; nice going. Did you modify Hikaru's build.py or did you start from scratch?

This is making me think that the builder might be something to pull out into an independent project. It will need some work to separate out the quirks from straightforward processing.

Someone else suggested pydantic as well. Pydantic is already used in the underlying Kubernetes stuff I have mixed feelings putting it into the Kubernetes Hikaru build as it feels slightly like overkill, but more importantly there are other features I'd consider activating via properties and I'm not sure that using pydantic will make those harder to put in place later.

from hikaru.

anthcp-infocom avatar anthcp-infocom commented on June 3, 2024

I experimented with datamodel-codegen (https://github.com/koxudaxi/datamodel-code-generator) to convert the openapi spec Openshift 3.11 file to Pydantic python objects and found it worked a treat! From there I just build some functions as you can see to use at work to replace helm... It was your work that inspired me to do this!!!

from hikaru.

haxsaw avatar haxsaw commented on June 3, 2024

Well cool! I guess I'll close this out then, but if you want to revisit in the future then just open again or create a new one.

from hikaru.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.