feat(release): add no-data-partitions and no-private-partition image features#943
Open
jmt-lab wants to merge 1 commit into
Open
feat(release): add no-data-partitions and no-private-partition image features#943jmt-lab wants to merge 1 commit into
jmt-lab wants to merge 1 commit into
Conversation
9d3c735 to
28305c6
Compare
…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.
28305c6 to
2b5abdf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
bottlerocket-image-featureswithno_data_partitionsandno_private_partitionfields and tests.apiserver'sshould_encrypt()return false when either partition-omitting flag is set, with unit-test coverage via a pure helper.Conflicts:betweenrelease-cryptand the new image features so encrypted-storage builds cannot drop the required partitions.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.