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

settings: Add container-runtime settings #2494

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

stmcginnis
Copy link
Contributor

@stmcginnis stmcginnis commented Oct 14, 2022

Issue number:

Closes #2292
Closes: #2466

Description of changes:

This adds settings.container-runtime settings. The affect how containerd is configured.

max-container-log-line-size controls how long a log line can be from a container before containerd breaks it into multiple separate lines.

max-concurrent-downloads controls how many concurrent downloads will be done in parallel to download an image.

settings.container-runtime.enable-unprivileged-icmp: Allow unprivileged containers to open ICMP echo sockets.

settings.container-runtime.enable-unprivileged-ports: Allow unprivileged containers to bind to ports < 1024.

Testing done:

Created EKS cluster with custom build, checked setting and retrieving settings via apiclient get settings.container-runtime. Verified containerd service config would get updated and service restarted.

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.

@stmcginnis stmcginnis marked this pull request as draft October 14, 2022 22:10
@stmcginnis stmcginnis force-pushed the cr-settings branch 3 times, most recently from a95dd71 to 82257e6 Compare October 14, 2022 22:41
Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending testing (and passing builds). The only thought I had is whether we want to constrain the values to those that containerd accepts (e.g. -1 - 16384 for max_container_log_line_size, questionable whether 0 is allowable), but that seems like more trouble than its worth right now.

@stmcginnis
Copy link
Contributor Author

The only thought I had is whether we want to constrain the values to those that containerd accepts

Yeah, good call. This has come up a couple times now. From what I understand, we don't have a good mechanism to handle extra validation for numeric values yet, so I do think we should get to that as a (hopefully soon) follow on.

@stmcginnis stmcginnis marked this pull request as ready for review October 15, 2022 00:53
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
This adds `settings.container-runtime.max-container-log-line-size` and
`settings.container-runtime.max-concurrent-downloads` settings. The
affect how containerd is configured.

`max-container-log-line-size` controls how long a log line can be from a
container before containerd breaks it into multiple separate lines.

`max-concurrent-downloads` controls how many concurrent downloads will
be done in parallel to download an image.

Signed-off-by: Sean McGinnis <[email protected]>
@stmcginnis stmcginnis merged commit f212ffa into bottlerocket-os:develop Oct 15, 2022
@stmcginnis stmcginnis deleted the cr-settings branch October 15, 2022 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants