Set kubelet eviction-hard based on total memory#150
Set kubelet eviction-hard based on total memory#150jetstack-ci-bot merged 5 commits intojetstack:masterfrom charlieegan3:hard-eviction-target-issue-149
Conversation
|
@charlieegan3 PR needs rebase |
simonswine
left a comment
There was a problem hiding this comment.
Thanks for this, see my little change requests
| end | ||
|
|
||
| def five_percent_of_total_ram(total_bytes) | ||
| five_percent = (total_bytes * 0.05 / 1_000_000).round |
There was a problem hiding this comment.
I think with Mi you would need to divide by 1024^2
| "--tls-cert-file=<%= @cert_file %>" \ | ||
| "--tls-private-key-file=<%= @key_file %>" \ | ||
| <% end -%> | ||
| --eviction-hard=memory.available<<%= @hard_eviction_memory_threshold %> |
There was a problem hiding this comment.
I would feel safer with quoting the whole thing "--eviction[...]%>"
|
Based on the quick verify failure I need to also have these changes in the module repo: jetstack/puppet-module-kubernetes#22 - so I'm trying that... |
|
/test puppet-tarmak-acceptance-ubuntu v1.9 |
The kubelet will default to memory.available<100Mi as the hard eviction threshold. This makes that figure 5% of the total memory or 100Mi. Whichever is greater. Read from the default memory facts to set the kubelet `eviction-hard` parameter. Default facts: https://puppet.com/docs/facter/3.10/core_facts.html#memory Implements #149
|
I have a feeling that the ubuntu acceptance tests are also failing because of the changes to the puppet repo config. This looks like maybe the submodule isn't there for some reason. Either way, I'm not sure how it could be caused by the changes in this PR... |
|
/test verify quick |
|
/test puppet-tarmak-acceptance-ubuntu v1.9 |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: simonswine The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Automatic merge from submit-queue. |
The kubelet will default to memory.available<100Mi as the hard eviction
threshold. This makes that figure 5% of the total memory or 100Mi.
Whichever is greater.
Read from the default memory facts to set the kubelet
eviction-hardparameter.
Default facts:
https://puppet.com/docs/facter/3.10/core_facts.html#memory
Implements #149
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note: