Git Product home page Git Product logo

Comments (6)

abonas avatar abonas commented on July 17, 2024

Hi @dasch , thanks for bringing this up. Kubeclient doesn't support this feature yet. Contributions are welcome :)
cc @simon3z

from kubeclient.

simon3z avatar simon3z commented on July 17, 2024

The kubernetes side is lacking of a couple features that I'd need to make the log collection really usable for my use-case. Which means that for me at this time the kubeclient side is not interesting yet. But obviously if there's a contribution we'll gladly accept it.

from kubeclient.

jimmidyson avatar jimmidyson commented on July 17, 2024

@simon3z Out of interest, what log functionality do you think is lacking in Kubernetes? There's an open issue (kubernetes/kubernetes#12447) to collect some ideas to make log endpoint more useful - good to hear your thoughts there if you have ideas.

from kubeclient.

jonmoter avatar jonmoter commented on July 17, 2024

@abonas, I was looking at the code to implement this functionality. The way that Kubeclient::Client is implemented, it seems pretty straightforward to have CRUD-like functionality for the main objects, like Services, Pods, Events, etc.

But log retrieval uses an endpoint of the form GET /api/v1/namespaces/{namespace}/pods/{name}/log, which is an endpoint that is specific to the Pod object. I don't see an elegant way of adding functionality specific to one of the objects that's not in the others.

Do you have a plan/design in mind for how to add that sort of functionality? Or should I come up with something that seems sane to me, and we can hash out the details in a pull request?

from kubeclient.

abonas avatar abonas commented on July 17, 2024

@jonmoter Hi, I didn't think yet how to implement it, and I'd like to hear first @simon3z which log functionality he is looking for in k8s.
Generally speaking, the client doesn't have to mimic the way the server api is structured. And the objects themselves that are constructed on client side (pod, etc.) have only data, not logic such as going to server again - I think it's better to keep them clean from server connections, etc.
Hence, in theory, you could have something like client.get_log (namespace, pod_name) , but this is really a brief thought on the topic.

from kubeclient.

jonmoter avatar jonmoter commented on July 17, 2024

@abonas PR #121 is my first pass at implementing functionality to get (or watch) logs from a pod. The Kubernetes API doesn't expose any more functionality than what I've implemented. So that's all we can do for now.

from kubeclient.

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.