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

[features] migrate OOM kill #479

Merged
merged 5 commits into from
May 10, 2022
Merged

Conversation

celenechang
Copy link
Contributor

What does this PR do?

Migrate OOM kill check to use FeatureFactory.

This requires #430 before merging.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Describe your test plan

Write there any instructions and details you may have to test your PR.

@celenechang celenechang added this to the v1.0.0 milestone May 5, 2022
@celenechang celenechang requested review from a team as code owners May 5, 2022 18:16
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling

@celenechang celenechang force-pushed the celene/oom_kill_featurefactory branch from 27fae79 to cfc4fb6 Compare May 5, 2022 19:54
Comment on lines +49 to +50
IsRequired *bool
Containers []apicommonv1.AgentContainerName
Copy link
Contributor Author

Choose a reason for hiding this comment

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

suggested rename, wdyt @clamoriniere ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Much better, thanks

@codecov-commenter
Copy link

codecov-commenter commented May 6, 2022

Codecov Report

Merging #479 (e696856) into main (620df0a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #479   +/-   ##
=======================================
  Coverage   59.68%   59.68%           
=======================================
  Files           3        3           
  Lines         129      129           
=======================================
  Hits           77       77           
  Misses         40       40           
  Partials       12       12           
Flag Coverage Δ
unittests 59.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 620df0a...e696856. Read the comment docs.

controllers/datadogagent/feature/oom_kill/feature.go Outdated Show resolved Hide resolved
Comment on lines +49 to +50
IsRequired *bool
Containers []apicommonv1.AgentContainerName
Copy link
Collaborator

Choose a reason for hiding this comment

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

Much better, thanks

}

return feature.RequiredComponents{
Agent: feature.RequiredComponent{IsRequired: &f.enable},
Copy link
Collaborator

Choose a reason for hiding this comment

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

here by setting the IsRequired: false when f.enable is false make the Agent globally unwanted (with the current logic implemented in the Feature Factory).

the idea was:

  • set to false: we should not deploy this component
  • nil: the feature don't need it, but don't care if it is deployed
  • set to true: the feature need this component.

we can revisite the logic.

But I would suggest to no set it if f.enable == false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right, thanks for catching that. i also forgot to add containers

@celenechang celenechang merged commit bb0d4f1 into main May 10, 2022
@celenechang celenechang deleted the celene/oom_kill_featurefactory branch May 10, 2022 13:43
celenechang added a commit that referenced this pull request May 18, 2022
* [features] migrate oom kill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants