Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client: Any chance to provide a suffix for SubResourceClient? #3114

Open
tpoxa opened this issue Feb 14, 2025 · 0 comments
Open

Client: Any chance to provide a suffix for SubResourceClient? #3114

tpoxa opened this issue Feb 14, 2025 · 0 comments

Comments

@tpoxa
Copy link

tpoxa commented Feb 14, 2025

I have a runtime controller-runtime client provided by kubebuilder.
How can I get a subresource by specifying its suffix?

  node := &v1.Node{}
  node.SetName(nodeName)

  // Create the proxy request to kubelet's stats endpoint
  stats := &Stats{}

  err := k.client.SubResource("proxy").
    Get(ctx,
      node,
      stats,
      //specify suffix  "/stats/summary"
    )

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant