-
Notifications
You must be signed in to change notification settings - Fork 1.4k
⚠️ Implement secure diagnostics (metrics, pprof, log level changes) #9264
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
Conversation
b6cdb3b
to
362a49d
Compare
8a2de8c
to
d74ee1f
Compare
d74ee1f
to
caa59bc
Compare
This PR is now ready for review. I will finish the open todos once we have consensus on the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit
6627c77
to
fc6f48e
Compare
@chrischdi PTAL :) |
Signed-off-by: Stefan Büringer [email protected]
fc6f48e
to
500fc1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 83d875ee147eb33e2020c2672e73dff6a7e90bff
|
/hold cancel |
Thx everyone for the reviews!! |
**What is the purpose of this pull request/Why do we need it?** See: https://cluster-api.sigs.k8s.io/developer/providers/migrations/v1.5-to-v1.6 See: kubernetes-sigs/cluster-api#9264 **Checklist:** - [x] Documentation updated - [x] Includes [emojis](https://github.com/kubernetes-sigs/kubebuilder-release-tools?tab=readme-ov-file#kubebuilder-project-versioning)
Signed-off-by: Stefan Büringer [email protected]
What this PR does / why we need it:
Changes to flags
--metrics-bind-addr
flag--diagnostics-address
(default::8443
)--insecure-diagnostics
(default:false
)With the following behavior
--metrics-bind-addr=<addr>
is set:--diagnostics-address=<addr> --insecure-diagnostics
is set--metrics-bind-addr
--diagnostics-address
is setDefault behavior:
--metrics-bind-addr
set: insecure serving on the specified address (as before)CAPI_DIAGNOSTICS_ADDRESS=localhost:8080
&CAPI_INSECURE_DIAGNOSTICS=true
: insecure serving on localhost:8080This should allow a smooth transition as folks can set either the env vars for clusterctl or
--metrics-bind-addr
directly on the binary to preserve the current behaviorIt is now possible to easily and securely expose metrics in production. Additionally, the pprof endpoint can now be also always enabled and it is possible to change log levels dynamically.
This should make it a lot easier to debug Cluster API in production.
Open TODOs:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #9289