kubernetes-sigs / controller-runtime

Repo for the controller-runtime subproject of kubebuilder (sig-apimachinery)
Apache License 2.0
2.44k stars 1.13k forks source link

Support non-CRUD subresources (like pod logs) #452

Open gaocegege opened 5 years ago

gaocegege commented 5 years ago

Hi I am one of the maintainers @kubeflow

We are using kubebuilder to implement some CRDs for Machine Learning/Deep Learning workloads. We meet some problems with the client in controller-runtime.

We need to get the logs of pods using the client, But It seems that controller-runtime client has a higher level abstraction on top of Kubernetes client. Do we have a plan to support expansion (e.g. https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go) for the client? Or is there any suggestion to do it with controller-runtime client?

Now we have to create a Kubernetes client and use this to get pod logs.

I'd appreciate it if anyone could help me.

Thanks :clinking_glasses: :beers:

DirectXMan12 commented 5 years ago

/kind feature

DirectXMan12 commented 5 years ago

We had some plans for supporting subresources, but haven't gotten around to them yet. If you put forth a proposed design, I'd be happy to take a look. We'd have to add support for the wonky streaming that logs uses, since right now the client just deals with CRUD.

DirectXMan12 commented 5 years ago

/priority backlog

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

DirectXMan12 commented 5 years ago

So, we'll get generic subresource support eventually, but non-CRUD subresources need to be handled specially

DirectXMan12 commented 5 years ago

cc #172 (which is mainly for CRUD subresources ATM)

fejta-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

gaocegege commented 4 years ago

/remove-lifecycle rotten

DirectXMan12 commented 4 years ago

/lifecycle frozen

vincepri commented 4 years ago

/help

k8s-ci-robot commented 4 years ago

@vincepri: This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/controller-runtime/issues/452): >/help > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
vincepri commented 4 years ago

/kind design

liuxinbot commented 3 years ago

/help

imilchev commented 3 years ago

I am also interested in this

27149chen commented 3 years ago

is there any workarouds?

coderanger commented 3 years ago

is there any workarouds?

You can use client-go instead.

gaocegege commented 3 years ago

You can use client-go instead.

It is hard to keep two clients, I think. It will be better if we support it in controller-runtime.

acechef commented 1 year ago

Is there any progress on this issue?

benjaminjb commented 1 year ago

👀

jasiu001 commented 10 months ago

Is it ready or still in the design phase?

sbueringer commented 10 months ago

Nothing changed.

matheuscscp commented 3 months ago

+1

sbueringer commented 1 month ago

Just fyi, the only thing that +1 comments achieve is annoying everyone who is watching this issue for relevant updates :) Please use the 👍 emoji on https://github.com/kubernetes-sigs/controller-runtime/issues/452#issue-449697241 instead.