Skip to content

feat(release): add no-data-partitions and no-private-partition image features#943

Open
jmt-lab wants to merge 1 commit into
bottlerocket-os:developfrom
jmt-lab:feat/no-data-partition
Open

feat(release): add no-data-partitions and no-private-partition image features#943
jmt-lab wants to merge 1 commit into
bottlerocket-os:developfrom
jmt-lab:feat/no-data-partition

Conversation

@jmt-lab

@jmt-lab jmt-lab commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Introduce two opt-in image features that omit the BOTTLEROCKET-DATA-{A,B} and BOTTLEROCKET-PRIVATE filesystems from the image. Both default to off; behavior is unchanged when neither is enabled.

  • Extend bottlerocket-image-features with no_data_partitions and no_private_partition fields and tests.
  • Make apiserver's should_encrypt() return false when either partition-omitting flag is set, with unit-test coverage via a pure helper.
  • Declare RPM Conflicts: between release-crypt and the new image features so encrypted-storage builds cannot drop the required partitions.
  • Document the design and operator-attached storage workflow in PARTITION_FEATURES.md and cross-link from ENCRYPTED_STORAGE.md.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@jmt-lab jmt-lab requested review from arnaldo2792 and vigh-m June 8, 2026 21:49
@jmt-lab jmt-lab force-pushed the feat/no-data-partition branch 3 times, most recently from 9d3c735 to 28305c6 Compare June 10, 2026 21:29
…features

Introduce two opt-in image features that omit the BOTTLEROCKET-DATA-{A,B}
and BOTTLEROCKET-PRIVATE filesystems from the image. Both default to off; behavior is
unchanged when neither is enabled.

- Add `local-tmpfs.mount` and `bottlerocket-tmpfs.mount` as fallbacks
  gated on inverse `ConditionPathExists=` against the partition labels,
  so they activate only when the corresponding partition is absent.
- Guard partition-dependent units (`local.mount`, `bottlerocket.mount`,
  `opt-{civ,cni,csi}.mount`, `lib-modules.mount`, kernel-devel mounts,
  `repart-*`, `encrypt-*`, `unlock-*`) with positive
  `ConditionPathExists=` so they no-op cleanly when partitions are
  omitted.
- Split `prepare-local-fs.service` into a small helper script that is a
  no-op when BOTTLEROCKET-DATA is absent and runs `systemd-makefs` plus
  repart-mask when present.
- Extend `bottlerocket-image-features` with `no_data_partitions` and
  `no_private_partition` fields and tests.
- Make `apiserver`'s `should_encrypt()` return false when either
  partition-omitting flag is set, with unit-test coverage via a pure
  helper.
- Declare RPM `Conflicts:` between `release-crypt` and the new image
  features so encrypted-storage builds cannot drop the required
  partitions.
- Document the design and operator-attached storage workflow in
  PARTITION_FEATURES.md and cross-link from ENCRYPTED_STORAGE.md.
@jmt-lab jmt-lab force-pushed the feat/no-data-partition branch from 28305c6 to 2b5abdf Compare June 10, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant