node-feature-discovery
node-feature-discovery copied to clipboard
nfd-worker: use single http port for metrics and healthz
This PR drops the separate http servers for metrics and the health endpoint. In addition, ditch the grpc-health and replace it with plain http.
The PR is split into three commits:
- Drop the gRPC health port
- Convert
--metricsto--portUse a single port for serving http. In addition to metrics we will have the healthz endpoint. - Add healthz endpoint
Deploy Preview for kubernetes-sigs-nfd ready!
| Name | Link |
|---|---|
| Latest commit | 850c544522b507fed4a51746ea63d96abc8144aa |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/679c651e9800d30008d7dd6a |
| Deploy Preview | https://deploy-preview-1929--kubernetes-sigs-nfd.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This is kinda RFC to get feedback. The http endpoints are "read-only" so I think we might as well serve them from a single port. Also, a single port consumed in host network scenarios. One motivation is to get rid of all direct gRPC dependencies, too.
One caveat/note is that in it's current form this doesn't deprecate the existing command line flags or Helm values. We could do that, e.g. with some sort of extra logic and override/fallback behavior around all args (-port, -metrics, -grpc-health) but I'm not sure it's worth the trouble.
If/when we're happy with this we can make the other daemons (nfd-master, nfd-topology-updater, nfd-gc) to follow this.
/hold
/cc @ArangoGutierrez @tobiasgiese @adrianchiris
serve them from a single port. Also, a single port consumed in host network scenarios.
IMO we should not care if we expose 1 or 3 ports, there should be enough ports free on a system. Also the ports are configurable, thus it is totally fine to me if we'd keep multiple ports. Nevertheless I like the idea having a single port :)
One caveat/note is that in it's current form this doesn't deprecate the existing command line flags or Helm values.
I think it is okay to consider this as a breaking change and highlight it in the release notes. If we deprecate the ports we also have to ensure that the ports are listening and serve the correct content (i.e., both ports will handle the same).
IMO the change is a good improvement to our code and the UX for the users 👍🏻 /lgtm (as the hold label is on it anyway)
LGTM label has been added.
@PiotrProkop any comments?
@PiotrProkop any comments?
Always :) I prefer single port implementation as it removes some code and make overall architecture simpler.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: ArangoGutierrez, marquiz
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [ArangoGutierrez,marquiz]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
LGTM label has been added.
/retest
unhold @marquiz ??
unhold @marquiz ??
Thanks for the reviews folks :pray: I'll make some last checks on these and then unhold
/unhold
Rebased. ping @tobiasgiese @ArangoGutierrez
/lgtm
LGTM label has been added.