-
Notifications
You must be signed in to change notification settings - Fork 203
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
Adds new flag --metrics-host #811
Conversation
Signed-off-by: Nathan Kinkade <[email protected]>
I just noticed that a PR was merged yesterday which set |
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.
Hi @nkinkade,
thanks for your PR. Yes, since a few days, the hostNetwork=true
setting is not the default anymore, so this problem should not occur too often.
But, you are right, it may be good in some cases to also configure the host of the interface to listen on. However, the --metrics-port
flag was released with 1.13.2
, so this PR would be a breaking change, which we want to avoid. Instead of replacing the flag it would be good to add an additional --metrics-host
flag to kured (and also to the chart).
@ckotzbauer: I have modified the PR and its title. The changes now only add a new flag I am happy to contribute a corresponding PR to the charts repo, once I have confirmation from you that this change looks okay. Thank you. |
The code looks good, thanks!
Thanks!! |
kubereboot/kured#811 Signed-off-by: Nathan Kinkade <[email protected]>
kubereboot/kured#811 Signed-off-by: Nathan Kinkade <[email protected]>
This reverts commit 528c7bb. Signed-off-by: Nathan Kinkade <[email protected]>
The flag --metrics-port already exists. While not as clean, to avoid introducing a backward incompatible change to flags, this commit adds a new --metrics-host flag, which in combination with the existing --metrics-port flag can define a complete listen address for the metrics server as "<metrics-host>:<metrics-port>" Signed-off-by: Nathan Kinkade <[email protected]>
Signed-off-by: Nathan Kinkade <[email protected]>
2e16c0e
to
e5d94c4
Compare
Let me know if I missed anything. Thank you! |
Thanks for the changes!! |
kubereboot/kured#811 Signed-off-by: Nathan Kinkade <[email protected]>
kubereboot/kured#811 Signed-off-by: Nathan Kinkade <[email protected]> Signed-off-by: Christian Kotzbauer <[email protected]> Co-authored-by: Christian Kotzbauer <[email protected]>
* doc: add drain-pod-selector (#71) Signed-off-by: Christian Kotzbauer <[email protected]> * doc: Documents new --metrics-host flag (#69) kubereboot/kured#811 Signed-off-by: Nathan Kinkade <[email protected]> * doc: add version range Signed-off-by: Christian Kotzbauer <[email protected]> * doc: add new arguments Signed-off-by: Christian Kotzbauer <[email protected]> --------- Signed-off-by: Christian Kotzbauer <[email protected]> Signed-off-by: Nathan Kinkade <[email protected]> Co-authored-by: nkinkade <[email protected]>
* expose --drain-pod-selector (#43) Signed-off-by: Boris Pruessmann <[email protected]> Signed-off-by: Christian Kotzbauer <[email protected]> Co-authored-by: Christian Kotzbauer <[email protected]> * Adds new flag --metrics-host to chart (#50) kubereboot/kured#811 Signed-off-by: Nathan Kinkade <[email protected]> Signed-off-by: Christian Kotzbauer <[email protected]> Co-authored-by: Christian Kotzbauer <[email protected]> * feat: changes for 1.14.0 Signed-off-by: Christian Kotzbauer <[email protected]> --------- Signed-off-by: Boris Pruessmann <[email protected]> Signed-off-by: Christian Kotzbauer <[email protected]> Signed-off-by: Nathan Kinkade <[email protected]> Co-authored-by: Boris Prüßmann <[email protected]> Co-authored-by: nkinkade <[email protected]>
Kured runs with
hostNetwork=true
, which means that, today, Kured will expose the metrics endpoint on what is probably a public interface for many deployments. The metrics are generally not sensitive data, but as a policy it seems wrong to do this. Allowing the user to configure which port Kured exposes metrics on is a step in the right direction, but the current implementation does not allow the user to specify the address to listen on. For example, in our use case, we would like for the metrics server to only listen on a loopback address. This would allow us to put kube-rbac-proxy in front of the metrics endpoint.This change could slightly complicate the Helm chart because it not only affects the metrics endpoint, but also the
readinessProbe
configuration.