install: Add "extra" space
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 230
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 38
Description
Today, `bootc install to-disk` has `--root-size`. But that's not in the install config. I think we should delete `--root-size`, moving this to the install config.
## Add min and max "constraints"
For generic base images, we can't sanely provide a default size because the user may add an arbitrary amount of data. So the first idea here is that we support base images providing an "elastic" default that takes as input the base image size. Something like this:
```
[install.filesystem.root]
size-constraints-min = "double-image,extra=2Gi"
```
Where `size-constraints-min` is a comma separated list of "constraints". `double-image` here means that we allocate space at least for 2x the container image size (for inplace upgrades), and `extra=2Gi` of free space on top of that.
For "final" images derived by the end consumer, they can do e.g.
```
[install.filesystem.root]
size-max = "10Gi"
```
if they want to have a fixed size that they know exactly. (Do we error out if `size-constraints-min` would be greater than `size-max`, or just ignore it? Note at least they can always just `RUN rm /usr/lib/bootc/install/*` if they want to fully take ownership)
Contributor guide
Assessment
This issue has not been assessed yet.