mirror of
https://github.com/FlipsideCrypto/convox.git
synced 2026-02-06 10:56:56 +00:00
k8s: calculate cpu/memory scale correctly for output (#50)
This commit is contained in:
parent
99af46ecdb
commit
4c96aab79a
@ -65,6 +65,14 @@ func (p *Provider) ServiceList(app string) (structs.Services, error) {
|
||||
Ports: serviceContainerPorts(cs[0], ms.Internal),
|
||||
}
|
||||
|
||||
if v := cs[0].Resources.Requests.Cpu(); v != nil {
|
||||
s.Cpu = int(v.MilliValue())
|
||||
}
|
||||
|
||||
if v := cs[0].Resources.Requests.Memory(); v != nil {
|
||||
s.Memory = int(v.Value() / (1024 * 1024)) // Mi
|
||||
}
|
||||
|
||||
ss = append(ss, s)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user