Skip to content
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

Add parameter to configure health endpoint port #1885

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

tobiasgiese
Copy link
Member

@tobiasgiese tobiasgiese commented Sep 23, 2024

Follow-up to #1878

To avoid port conflicts while running in hostNetwork mode we have to make the health ports configurable.

Tested via

❯ helm template \
  --set topologyUpdater.enable=true \
  --set master.healthPort=9001 \
  --set worker.healthPort=9002 \
  --set topologyUpdater.healthPort=9003 \
  deployment/helm/node-feature-discovery | grep -e -health
          - "-health=9003"
        - "-health=9002"
            - "-health=9001"

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 23, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 23, 2024
Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 53ddf08
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/66f2bb8bf092700007fac973
😎 Deploy Preview https://deploy-preview-1885--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.

Copy link
Contributor

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit, otherwise looks good imo

@tobiasgiese
Copy link
Member Author

/cc @marquiz

@marquiz marquiz mentioned this pull request Sep 23, 2024
14 tasks
@@ -138,6 +136,8 @@ func initFlags(flagset *flag.FlagSet) (*worker.Args, *worker.ConfigOverrideArgs)
"Do not publish feature labels")
flagset.IntVar(&args.MetricsPort, "metrics", 8081,
"Port on which to expose metrics.")
flagset.IntVar(&args.GrpcHealthPort, "health", 8082,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same conversation as in master

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the helm value as healthPort, WDYT?

Copy link
Contributor

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for addressing my comments @tobiasgiese left a few minor nit based on the flag rename.

@@ -58,6 +58,7 @@ master:
# be removed with it in a future release
port: 8080
metricsPort: 8081
healthPort: 8082
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im ok with this being general health port while we map to grpc-health flag. later on it can map to a different flag if/once needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 24, 2024
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 24, 2024
Signed-off-by: Tobias Giese <tgiese@nvidia.com>
Copy link
Contributor

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tobiasgiese
Copy link
Member Author

/retest

Copy link
Contributor

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 24, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5c6de8e5df03440483409e14c2ff4d531d817b07

@tobiasgiese
Copy link
Member Author

tobiasgiese commented Sep 24, 2024

/retest

something is broken/flaky here 🤔

failed to remove nfd-builder: no builder "nfd-builder" found
ERROR: failed to remove one or more builders

and

net/http: TLS handshake timeout

Seems like the community prow is broken currently

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tobiasgiese for the contribution. Looks good to me

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianchiris, marquiz, tobiasgiese

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:

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2024
@k8s-ci-robot k8s-ci-robot merged commit 530bedd into kubernetes-sigs:master Sep 24, 2024
12 checks passed
@tobiasgiese tobiasgiese deleted the health-port-arg branch September 24, 2024 15:29
@marquiz
Copy link
Contributor

marquiz commented Oct 9, 2024

/cherry-pick release-0.16

@k8s-infra-cherrypick-robot

@marquiz: #1885 failed to apply on top of branch "release-0.16":

Applying: Add parameter to configure health endpoint port
Using index info to reconstruct a base tree...
M	cmd/nfd-master/main.go
M	cmd/nfd-worker/main.go
M	deployment/helm/node-feature-discovery/templates/master.yaml
M	deployment/helm/node-feature-discovery/templates/topologyupdater.yaml
M	deployment/helm/node-feature-discovery/templates/worker.yaml
M	deployment/helm/node-feature-discovery/values.yaml
M	docs/deployment/helm.md
Falling back to patching base and 3-way merge...
Auto-merging docs/deployment/helm.md
CONFLICT (content): Merge conflict in docs/deployment/helm.md
Auto-merging deployment/helm/node-feature-discovery/values.yaml
Auto-merging deployment/helm/node-feature-discovery/templates/worker.yaml
CONFLICT (content): Merge conflict in deployment/helm/node-feature-discovery/templates/worker.yaml
Auto-merging deployment/helm/node-feature-discovery/templates/topologyupdater.yaml
CONFLICT (content): Merge conflict in deployment/helm/node-feature-discovery/templates/topologyupdater.yaml
Auto-merging deployment/helm/node-feature-discovery/templates/master.yaml
CONFLICT (content): Merge conflict in deployment/helm/node-feature-discovery/templates/master.yaml
Auto-merging cmd/nfd-worker/main.go
Auto-merging cmd/nfd-master/main.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add parameter to configure health endpoint port
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.16

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@marquiz
Copy link
Contributor

marquiz commented Oct 9, 2024

Very low risk for backporting, even if it brings new functionality, modifying the source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants