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

[addons] Introduce NodeProblemDetector #11381

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

dntosas
Copy link
Contributor

@dntosas dntosas commented May 4, 2021

Node Problem Detector aims to make various node problems visible to
the upstream layers in the cluster management stack. It is a daemon
that runs on each node, detects node problems and reports them to apiserver
so to avoid scheduling new pods on bad nodes and also easily identify
which are the problems on underlying nodes.

Project Home: https://github.com/kubernetes/node-problem-detector

Signed-off-by: dntosas ntosas@gmail.com

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 4, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @dntosas. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 4, 2021
@dntosas dntosas force-pushed the addons-add-npd branch 2 times, most recently from 2ec87e3 to 0a8268c Compare May 4, 2021 14:01
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 4, 2021
@dntosas dntosas force-pushed the addons-add-npd branch 2 times, most recently from 92ec890 to 73899ee Compare May 4, 2021 14:23
@olemarkus
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 7, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 22, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 22, 2021
@dntosas
Copy link
Contributor Author

dntosas commented May 22, 2021

/assign @mikesplain

@dntosas
Copy link
Contributor Author

dntosas commented May 22, 2021

/assign @olemarkus

docs/addons.md Outdated Show resolved Hide resolved
docs/addons.md Outdated Show resolved Hide resolved
@dntosas dntosas requested a review from hakman June 3, 2021 20:57
Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

A few more questions if you don't mind:

  1. Why not also add the limits together with the requests?
  2. Why not use the tolerations from the original manifest:
        - effect: NoSchedule
          operator: Exists
        - effect: NoExecute
          operator: Exists

@dntosas
Copy link
Contributor Author

dntosas commented Jun 10, 2021

A few more questions if you don't mind:

  1. Why not also add the limits together with the requests?
  2. Why not use the tolerations from the original manifest:
        - effect: NoSchedule
          operator: Exists
        - effect: NoExecute
          operator: Exists
  1. I thought it was like a "common practice" for Kops addons to avoid limits and unnecessary OOMkills and user friction. I can add them ofc if you believe they are needed in here. WDYT? ^^

  2. Done

@olemarkus
Copy link
Member

We a) avoid setting any default limits. b) don't add options for setting limits where limits can cause harm. Such as CNIs OOMing over a bad limit. For addons such as this, I think exposing limits is fine.

// Default: false
Enabled *bool `json:"enabled,omitempty"`
// Image is the NodeProblemDetector docker container used
// Default: k8s.gcr.io/node-problem-detector/node-problem-detector:v0.8.8
Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove this line. Seems too much effort to maintain it.

Suggested change
// Default: k8s.gcr.io/node-problem-detector/node-problem-detector:v0.8.8

Copy link
Member

Choose a reason for hiding this comment

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

I still see the line here and in a few other places.

@hakman
Copy link
Member

hakman commented Jun 16, 2021

@dntosas Any chance you have time to address the remaining nits?

@dntosas
Copy link
Contributor Author

dntosas commented Jun 16, 2021

@dntosas Any chance you have time to address the remaining nits?

y sure, pushed ^^ adding the limits also

@dntosas dntosas force-pushed the addons-add-npd branch 2 times, most recently from aec26c6 to 340a5eb Compare June 16, 2021 15:55
@dntosas dntosas requested a review from hakman June 16, 2021 15:56
Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

Let's keep the limits same as in the source template, unless there is a reason for them to differ.

}

if npd.MemoryRequest == nil {
defaultMemoryRequest := resource.MustParse("32Mi")
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/kubernetes/node-problem-detector/blob/v0.8.8/deployment/node-problem-detector.yaml#L33-L39

Suggested change
defaultMemoryRequest := resource.MustParse("32Mi")
defaultMemoryRequest := resource.MustParse("80Mi")

}

if npd.CPULimit == nil {
defaultCPULimit := resource.MustParse("100m")
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/kubernetes/node-problem-detector/blob/v0.8.8/deployment/node-problem-detector.yaml#L33-L39

Suggested change
defaultCPULimit := resource.MustParse("100m")
defaultCPULimit := resource.MustParse("10m")

}

if npd.MemoryLimit == nil {
defaultMemoryLimit := resource.MustParse("128Mi")
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/kubernetes/node-problem-detector/blob/v0.8.8/deployment/node-problem-detector.yaml#L33-L39

Suggested change
defaultMemoryLimit := resource.MustParse("128Mi")
defaultMemoryLimit := resource.MustParse("80Mi")

// Default: false
Enabled *bool `json:"enabled,omitempty"`
// Image is the NodeProblemDetector docker container used
// Default: k8s.gcr.io/node-problem-detector/node-problem-detector:v0.8.8
Copy link
Member

Choose a reason for hiding this comment

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

I still see the line here and in a few other places.

Node Problem Detector aims to make various node problems visible to
the upstream layers in the cluster management stack. It is a daemon
that runs on each node, detects node problems and reports them to apiserver
so to avoid scheduling new pods on bad nodes and also easily identify
which are the problems on underlying nodes.

Project Home: https://github.com/kubernetes/node-problem-detector

Signed-off-by: dntosas <ntosas@gmail.com>
Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

Thanks @dntosas!
👍

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 Jun 16, 2021
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

2 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@johngmyers
Copy link
Member

/retest

1 similar comment
@johngmyers
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit 559b57e into kubernetes:master Jun 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jun 17, 2021
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. area/addons area/api area/documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/office-hours lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants