node-feature-discovery icon indicating copy to clipboard operation
node-feature-discovery copied to clipboard

nfd-worker: use single http port for metrics and healthz

Open marquiz opened this issue 1 year ago • 3 comments

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:

  1. Drop the gRPC health port
  2. Convert --metrics to --port Use a single port for serving http. In addition to metrics we will have the healthz endpoint.
  3. Add healthz endpoint

marquiz avatar Oct 23 '24 13:10 marquiz

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 23 '24 13:10 netlify[bot]

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

marquiz avatar Oct 23 '24 14:10 marquiz

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)

tobiasgiese avatar Oct 25 '24 09:10 tobiasgiese

LGTM label has been added.

Git tree hash: 8a54ab8d8a68256b9ea1ab5e21f47f677cf373f2

k8s-ci-robot avatar Oct 25 '24 09:10 k8s-ci-robot

@PiotrProkop any comments?

ArangoGutierrez avatar Oct 28 '24 14:10 ArangoGutierrez

@PiotrProkop any comments?

Always :) I prefer single port implementation as it removes some code and make overall architecture simpler.

PiotrProkop avatar Oct 28 '24 15:10 PiotrProkop

[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

Needs approval from an approver in each of these files:
  • ~~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

k8s-ci-robot avatar Nov 04 '24 15:11 k8s-ci-robot

LGTM label has been added.

Git tree hash: 88254734132642116c0084e16838417bb42fd4b9

k8s-ci-robot avatar Nov 04 '24 15:11 k8s-ci-robot

/retest

tobiasgiese avatar Nov 04 '24 16:11 tobiasgiese

unhold @marquiz ??

ArangoGutierrez avatar Nov 04 '24 17:11 ArangoGutierrez

unhold @marquiz ??

Thanks for the reviews folks :pray: I'll make some last checks on these and then unhold

marquiz avatar Nov 04 '24 18:11 marquiz

/unhold

marquiz avatar Jan 02 '25 15:01 marquiz

Rebased. ping @tobiasgiese @ArangoGutierrez

marquiz avatar Jan 31 '25 05:01 marquiz

/lgtm

tobiasgiese avatar Jan 31 '25 07:01 tobiasgiese

LGTM label has been added.

Git tree hash: bbacfa68f4e6e8a79fb9215c6ca084d63af20dd6

k8s-ci-robot avatar Jan 31 '25 07:01 k8s-ci-robot