Skip to content

Commit

Permalink
collect container defninition limits
Browse files Browse the repository at this point in the history
  • Loading branch information
Ari Zellner committed May 22, 2017
1 parent 4ea2250 commit 0304e7f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,15 @@ def parse_container_definition(container_def, pod_id)
parse_container_env_var(env_var)
end

limits_hash = container_def.try(:resources).try(:limits).to_h
new_result[:container_limit_items] = limits_hash.to_h.collect do |resource, value|
{
:item_type => Container.name,
:resource => resource.to_s,
:max => value
}
end

new_result
end

Expand Down

0 comments on commit 0304e7f

Please sign in to comment.