Adds new flag --metrics-host#811
Conversation
Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>
|
I just noticed that a PR was merged yesterday which set |
ckotzbauer
left a comment
There was a problem hiding this comment.
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 <kinkade@measurementlab.net>
kubereboot/kured#811 Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>
This reverts commit 528c7bb. Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>
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 <kinkade@measurementlab.net>
Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>
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 <kinkade@measurementlab.net>
kubereboot/kured#811 Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net> Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> Co-authored-by: Christian Kotzbauer <git@ckotzbauer.de>
* doc: add drain-pod-selector (#71) Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * doc: Documents new --metrics-host flag (#69) kubereboot/kured#811 Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net> * doc: add version range Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * doc: add new arguments Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> --------- Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net> Co-authored-by: nkinkade <nathan@kinkade.net>
* expose --drain-pod-selector (#43) Signed-off-by: Boris Pruessmann <boris@pruessmann.org> Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> Co-authored-by: Christian Kotzbauer <git@ckotzbauer.de> * Adds new flag --metrics-host to chart (#50) kubereboot/kured#811 Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net> Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> Co-authored-by: Christian Kotzbauer <git@ckotzbauer.de> * feat: changes for 1.14.0 Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> --------- Signed-off-by: Boris Pruessmann <boris@pruessmann.org> Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net> Co-authored-by: Boris Prüßmann <docbobo@users.noreply.github.com> Co-authored-by: nkinkade <nathan@kinkade.net>
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
readinessProbeconfiguration.