|
6 | 6 | SchedulingPolicy, |
7 | 7 | } from "@cloudflare/containers-shared"; |
8 | 8 | import { UserError } from "../errors"; |
9 | | -import { parseByteSize } from "../parse"; |
10 | 9 | import type { Config } from "../config"; |
11 | 10 | import type { |
12 | 11 | ContainerNormalisedConfig, |
@@ -59,28 +58,12 @@ export const getNormalizedContainerOptions = async ( |
59 | 58 | if ( |
60 | 59 | container.configuration?.disk !== undefined || |
61 | 60 | container.configuration?.vcpu !== undefined || |
62 | | - container.configuration?.memory_mib !== undefined || |
63 | | - // this is doubly deprecated, do we need to support this? |
64 | | - container.configuration?.memory !== undefined |
| 61 | + container.configuration?.memory_mib !== undefined |
65 | 62 | ) { |
66 | | - let normalisedDiskSize: number | undefined; |
67 | | - if (container.configuration?.disk !== undefined) { |
68 | | - normalisedDiskSize = |
69 | | - "size" in container.configuration.disk |
70 | | - ? // // have i got the right units here? |
71 | | - Math.round( |
72 | | - parseByteSize(container.configuration.disk.size ?? "2GB") |
73 | | - ) |
74 | | - : container.configuration.disk.size_mb; |
75 | | - } |
76 | | - |
77 | 63 | instanceTypeOrDisk = { |
78 | | - disk_size: normalisedDiskSize, |
| 64 | + disk_mb: container.configuration.disk?.size_mb, |
79 | 65 | vcpu: container.configuration?.vcpu, |
80 | | - memory_mib: |
81 | | - container.configuration.memory !== undefined |
82 | | - ? Math.round(parseByteSize(container.configuration?.memory)) |
83 | | - : container.configuration?.memory_mib, |
| 66 | + memory_mib: container.configuration?.memory_mib, |
84 | 67 | }; |
85 | 68 | } else { |
86 | 69 | instanceTypeOrDisk = { |
|
0 commit comments