File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,16 @@ func AsFunctionStatus(item appsv1.Deployment) *types.FunctionStatus {
35
35
CreatedAt : item .CreationTimestamp .Time ,
36
36
}
37
37
38
+ req := & types.FunctionResources {Memory : functionContainer .Resources .Requests .Memory ().String (), CPU : functionContainer .Resources .Requests .Cpu ().String ()}
39
+ lim := & types.FunctionResources {Memory : functionContainer .Resources .Limits .Memory ().String (), CPU : functionContainer .Resources .Limits .Cpu ().String ()}
40
+
41
+ if req .CPU != "0" || req .Memory != "0" {
42
+ function .Requests = req
43
+ }
44
+ if lim .CPU != "0" || lim .Memory != "0" {
45
+ function .Limits = lim
46
+ }
47
+
38
48
for _ , v := range functionContainer .Env {
39
49
if EnvProcessName == v .Name {
40
50
function .EnvProcess = v .Value
You can’t perform that action at this time.
0 commit comments