(api *userconfig.API, compute userconfig.Compute)
| 127 | } |
| 128 | |
| 129 | func podResourceRequestsTable(api *userconfig.API, compute userconfig.Compute) string { |
| 130 | sidecarCPUNote := "" |
| 131 | sidecarMemNote := "" |
| 132 | if api.Kind == userconfig.RealtimeAPIKind { |
| 133 | sidecarCPUNote = fmt.Sprintf(" (including %s for the %s sidecar container)", consts.CortexProxyCPU.String(), workloads.ProxyContainerName) |
| 134 | sidecarMemNote = fmt.Sprintf(" (including %s for the %s sidecar container)", k8s.ToMiCeilStr(consts.CortexProxyMem), workloads.ProxyContainerName) |
| 135 | } else if api.Kind == userconfig.AsyncAPIKind || api.Kind == userconfig.BatchAPIKind { |
| 136 | sidecarCPUNote = fmt.Sprintf(" (including %s for the %s sidecar container)", consts.CortexDequeuerCPU.String(), workloads.DequeuerContainerName) |
| 137 | sidecarMemNote = fmt.Sprintf(" (including %s for the %s sidecar container)", k8s.ToMiCeilStr(consts.CortexDequeuerMem), workloads.DequeuerContainerName) |
| 138 | } |
| 139 | |
| 140 | var items table.KeyValuePairs |
| 141 | if compute.CPU != nil { |
| 142 | items.Add("CPU", compute.CPU.String()+sidecarCPUNote) |
| 143 | } |
| 144 | if compute.Mem != nil { |
| 145 | items.Add("memory", compute.Mem.ToMiCeilStr()+sidecarMemNote) |
| 146 | } |
| 147 | if compute.GPU > 0 { |
| 148 | items.Add("GPU", compute.GPU) |
| 149 | } |
| 150 | if compute.Inf > 0 { |
| 151 | items.Add("Inf", compute.Inf) |
| 152 | } |
| 153 | |
| 154 | return items.String() |
| 155 | } |
| 156 | |
| 157 | func nodeGroupResourcesTable(api *userconfig.API, compute userconfig.Compute, maxMemMap map[string]kresource.Quantity) string { |
| 158 | var skippedNodeGroups []string |
no test coverage detected