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

Document how to use pprof which was introduced in controller-runtime v0.15.x #3338

Open
3 tasks
zqzten opened this issue Apr 17, 2023 · 6 comments
Open
3 tasks
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@zqzten
Copy link
Member

zqzten commented Apr 17, 2023

What do you want to happen?

As pprof support been introduced to controller-runtime, we can follow up to make it available (and visible) to end users of kubebuilder. This issue tracks the tasks needed TBD, please comment if I miss or get wrong on anything.

  • upgrade controller-runtime to v0.15.x
  • add a flag to configure the pprof serving address in main.go of kubebuilder scaffold
  • address the security issues (possible sensitive information leak) on exposing pprof in comments or the kubebuilder book

For the third task, I'm not sure what best practice we shall provide to end users so this is RFC.

For now, I can think up two possible ways:

  • defaulting the pprof bind address to 127.0.0.1:xxxx
  • protect the pprof endpoint by kube-rbac-proxy just like the metrics does (this would require more tasks TBD)

Please comment your preference or other opinions if applicable, thanks!

Extra Labels

/kind documentation

@zqzten zqzten added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 17, 2023
@k8s-ci-robot k8s-ci-robot added the kind/documentation Categorizes issue or PR as related to documentation. label Apr 17, 2023
@camilamacedo86

This comment was marked as resolved.

@camilamacedo86 camilamacedo86 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels May 4, 2023
@zqzten

This comment was marked as resolved.

@camilamacedo86

This comment was marked as resolved.

@zqzten

This comment was marked as resolved.

@camilamacedo86

This comment was marked as resolved.

@camilamacedo86 camilamacedo86 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Aug 17, 2023
@camilamacedo86 camilamacedo86 changed the title [Umbrella & RFC] pprof support Document how to use pprof which was introduced in controller-runtime v0.15.x Sep 16, 2023
@camilamacedo86
Copy link
Member

The comments above were hidden for simplicity. While we've decided to document its usage rather than include it in the default scaffold, you can refer to the hidden comments for more context on this decision. Nevertheless, introducing it as an optional plugin for the scaffold could be a viable alternative. This option would certainly be a beneficial addition.

To address this issue we must:

  • Create a doc under the reference to let users know how to use this option
  • Optionally we could address it via an Optional Plugin to update the default scaffold within this option. (I would recommend we doc first and then work in the PR with the proposal solution for it as a plugin as follow up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants