Coder Social home page Coder Social logo

Comments (41)

idoru avatar idoru commented on May 26, 2024 9

+1 this would be great to have to also access the serviceaccount/token subresource for controllers that may need to make API calls with arbitrary service accounts.

from controller-runtime.

zroubalik avatar zroubalik commented on May 26, 2024 2

Status is working, are there any plans to include Scale subresource as well? I'd like to control it from the client the same way it could be done via client-go.

from controller-runtime.

DirectXMan12 avatar DirectXMan12 commented on May 26, 2024 1

namely, if you're getting 404, make sure that you've done // +kubebuilder:subresource:status on the type definition for your CRD, so you get a CRD with the status subresource enabled.

from controller-runtime.

zroubalik avatar zroubalik commented on May 26, 2024 1

/remove-lifecycle stale.

from controller-runtime.

coderanger avatar coderanger commented on May 26, 2024

There is limited support for the status subresource via https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/client/client.go#L143

from controller-runtime.

liyinan926 avatar liyinan926 commented on May 26, 2024

I have a similar use case here that needs to evict pods instead of simply deleting them, using the eviction subresource of Pod.

from controller-runtime.

DirectXMan12 avatar DirectXMan12 commented on May 26, 2024

/kind feature

We had some initial ideas for how to design this, but I think the interface needs potential a bit more work. For instance, should we do client.Subresource("name").Update(obj)? Can we discover name from the object? (maybe?). Thoughts and usecases always welcome :-)

from controller-runtime.

shawn-hurley avatar shawn-hurley commented on May 26, 2024

So your thinking that we have a subresoureces Client, that has an interface containing Create, Update, Delete and Get that look exactly the same as the current interface?

I don't understand how we could determine the subresources for the object, could you explain what you had in mind would love to look into this.

I am assuming that we would want to keep the StatusWriter because it is so common that the helper makes sense?

from controller-runtime.

DirectXMan12 avatar DirectXMan12 commented on May 26, 2024

Depending on the subresource, we could use a RESTMapper to convert a Kind to the corresponding subresource entry in discovery, IIRC, but I haven't confirmed that -- it's just an initial thought off the top of my head. This doesn't work with subresources like status, though (even though we deal with status separately). I'd be curious to see what seemed more readable or ergonomic.

from controller-runtime.

fejta-bot avatar fejta-bot commented on May 26, 2024

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

from controller-runtime.

jay-rob avatar jay-rob commented on May 26, 2024

Is this issue looking for help? I have a need for doing the client supporting subresources such as get pods/log

from controller-runtime.

DirectXMan12 avatar DirectXMan12 commented on May 26, 2024

yeah. In general, anything in CR that doesn't have someone working on it is open for help -- I tend to apply the help-wanted tag a bit less in cases where the design might be a bit thorny or that might require serious apimachinery spelunking, but if you're up for some back and forth on design, I'm happy to have someone working on it :-)

from controller-runtime.

fejta-bot avatar fejta-bot commented on May 26, 2024

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

from controller-runtime.

DirectXMan12 avatar DirectXMan12 commented on May 26, 2024

/remove-lifecycle rotten
/lifecycle frozen

from controller-runtime.

cadedaniel avatar cadedaniel commented on May 26, 2024

+1 to this. Is there a quick way to document that this isn't supported, or return a 5xx when one tries to do so against envtest? Kubebuilder (which uses envtest) suggests users update status via err = r.Status().Update(context.Background(), instance). My controller was failing a new test I wrote because the Update was returning 404, which was really perplexing.

from controller-runtime.

shawn-hurley avatar shawn-hurley commented on May 26, 2024

@cadedaniel I believe that the status subresource should work. If you're getting a 404 return code I would double-check if your CRD has enabled the Status subresource.

from controller-runtime.

cadedaniel avatar cadedaniel commented on May 26, 2024

Yes, I must have missed this. Thanks, ignore my earlier comment please.

from controller-runtime.

DirectXMan12 avatar DirectXMan12 commented on May 26, 2024

/help

from controller-runtime.

k8s-ci-robot avatar k8s-ci-robot commented on May 26, 2024

@DirectXMan12:
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:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from controller-runtime.

vincepri avatar vincepri commented on May 26, 2024

/kind design

from controller-runtime.

fejta-bot avatar fejta-bot commented on May 26, 2024

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

from controller-runtime.

timebertt avatar timebertt commented on May 26, 2024

/remove-lifecycle stale
Any updates on this?
If there is a plan for how this should be implemented or we can agree on a design, I might be able to help with the implementation :)

from controller-runtime.

vincepri avatar vincepri commented on May 26, 2024

@tim-ebert We're waiting for a design proposal, see under designs/ for a template and examples

from controller-runtime.

alexeldeib avatar alexeldeib commented on May 26, 2024

heads up for anyone deciding to tackle this, versioning gets weird with scale: https://github.com/kubernetes/client-go/blob/36233866f1c7c0ad3bdac1fc466cb5de3746cfa2/scale/client.go#L182-L201

from controller-runtime.

fejta-bot avatar fejta-bot commented on May 26, 2024

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

from controller-runtime.

timebertt avatar timebertt commented on May 26, 2024

/remove-lifecycle stale

from controller-runtime.

alvaroaleman avatar alvaroaleman commented on May 26, 2024

Is this issue looking for help? I have a need for doing the client supporting subresources such as get pods/log

Those are not CRUD subresources, see #452 for that

@DirectXMan12 What is the concern with adding a simple ForSubresource(name string) Create/Patch option for this? Seems pretty straightforward and doesn't require any external API changes I think. It obviously allows for misuse if ppl use it for non-existing subresources but I think that should be ok if we add a warning to it?

from controller-runtime.

fejta-bot avatar fejta-bot commented on May 26, 2024

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-contributor-experience at kubernetes/community.
/lifecycle stale

from controller-runtime.

zroubalik avatar zroubalik commented on May 26, 2024

/remove-lifecycle stale

from controller-runtime.

fejta-bot avatar fejta-bot commented on May 26, 2024

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-contributor-experience at kubernetes/community.
/lifecycle stale

from controller-runtime.

fejta-bot avatar fejta-bot commented on May 26, 2024

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-contributor-experience at kubernetes/community.
/lifecycle rotten

from controller-runtime.

zroubalik avatar zroubalik commented on May 26, 2024

/remove-lifecycle stale

from controller-runtime.

k8s-triage-robot avatar k8s-triage-robot commented on May 26, 2024

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

from controller-runtime.

k8s-ci-robot avatar k8s-ci-robot commented on May 26, 2024

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from controller-runtime.

zroubalik avatar zroubalik commented on May 26, 2024

/reopen

from controller-runtime.

k8s-ci-robot avatar k8s-ci-robot commented on May 26, 2024

@zroubalik: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from controller-runtime.

zroubalik avatar zroubalik commented on May 26, 2024

/remove-lifecycle rotten

from controller-runtime.

alfredkrohmer avatar alfredkrohmer commented on May 26, 2024

@shawn-hurley can you please re-open this issue?

from controller-runtime.

k8s-triage-robot avatar k8s-triage-robot commented on May 26, 2024

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

from controller-runtime.

FillZpp avatar FillZpp commented on May 26, 2024

/remove-lifecycle stale

from controller-runtime.

k8s-triage-robot avatar k8s-triage-robot commented on May 26, 2024

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

from controller-runtime.

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.