Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a mechanism for containers to configure the host on first boot #1392

Closed
bcressey opened this issue Mar 15, 2021 · 1 comment · Fixed by #1387
Closed

add a mechanism for containers to configure the host on first boot #1392

bcressey opened this issue Mar 15, 2021 · 1 comment · Fixed by #1387
Assignees
Labels
area/kubernetes K8s including EKS, EKS-A, and including VMW type/enhancement New feature or request
Milestone

Comments

@bcressey
Copy link
Contributor

What I'd like:
I'd like a way to extend first boot setup by bringing my own custom logic in a container.

Some use cases:

Any alternatives you've considered:
In #1208 we looked at extending the settings-based API to create directories and files. The goal was to compose this functionality with other settings, such as #1209 for setting up filesystem mounts.

However, this introduces a lot of complexity in the general case. Declaring that a file should be created in a directory on a specific mounted filesystem means that we have to account for the filesystem's devices not always being available. When settings are changed, reconciliation can be challenging. The directory may be declared one way and later moved to a different mount; the directory may contain other, unmanaged host files; a declared file may have its contents modified outside of the API.

We can constrain this with arbitrary rules, such as: files created through the API are immutable; directories will be reconciled at boot, with permissions restored and unmanaged files removed. We can also limit composition: not allowing host files to be related to host directories; or not allowing host directories to be created on ephemeral disks.

In both cases we end up with an API that might suffice for the specific use cases we've heard about, but which is unlikely to generalize. The most powerful solution is to bring a host container with its own tools and logic, and rely on that instead of any host API features.

Host containers as they stand today fall short in a few ways. They run at an unspecified point in the boot sequence, but generally at the same time as orchestrated containers. They're meant to run as long-lived services rather than one-shots. They're also overly privileged for this use case; a super-powered bootstrap container could undermine many of the host protections in subtle ways.

@bcressey
Copy link
Contributor Author

Tracking the implementation in #1387.

@jhaynes jhaynes added this to Coming Soon in Bottlerocket Roadmap Mar 16, 2021
@gregdek gregdek added the status/in-progress This issue is currently being worked on label Mar 24, 2021
@gregdek gregdek added this to the next milestone Mar 24, 2021
@gregdek gregdek added the area/kubernetes K8s including EKS, EKS-A, and including VMW label Mar 24, 2021
@jhaynes jhaynes linked a pull request Apr 5, 2021 that will close this issue
@jhaynes jhaynes moved this from Coming Soon to Just Shipped in Bottlerocket Roadmap Jun 22, 2021
@bcressey bcressey removed the status/in-progress This issue is currently being worked on label Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes K8s including EKS, EKS-A, and including VMW type/enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants