Repository navigation
Commit 38a3244
committed
fix(cozy-lib): render tenant hugepages quota only as requests
A tenant with hugepages-2Mi or hugepages-1Gi in resourceQuotas got both
requests.hugepages-<size> and limits.hugepages-<size> in tenant-quota.
A ResourceQuota accepts huge pages only as hugepages-<size> or
requests.hugepages-<size>, so the apiserver rejects tenant-quota and the
tenant release fails to install or upgrade. Huge pages are not counted
in limits.memory either, so without this key a VM whose memory is
backed by huge pages runs outside the tenant quota.
The limits side is dropped for hugepages-* the same way it already is
for storage. sanitize still emits equal requests and limits, which is
what a pod spec needs for huge pages, so only the quota rendering
changes.
Signed-off-by: Yan Bondarenko <[email protected]>
Assisted-by: LLM1 parent 4087218 commit 38a3244
3 files changed
Lines changed: 36 additions & 0 deletions
File tree
- packages
- apps/tenant
- library/cozy-lib/templates
- tests/cozy-lib-tests/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
0 commit comments