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

kubernetes: add max_parallel_image_pulls and serialize_image_pulls #59

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ginglis13
Copy link
Contributor

Issue #, if available:

bottlerocket-os/bottlerocket#4058

Description of changes:

Add support for the serializeImagePulls and maxParallelImagePulls kubelet config settings: https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls

once merged and release, I have changes staged for bottlerocket-core-kit to pass through the setting that I'll PR. Currently testing those.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ginglis13 ginglis13 force-pushed the parallel-image-pulls branch from a11fe65 to ebac9f2 Compare September 5, 2024 15:33
Comment on lines +101 to +103
// Generated in `k8s-1.27+` variants only
serialize_image_pulls: bool,
max_parallel_image_pulls: i32,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these values not supported on older versions of kubelet?

If we add them like this, they'll still be in the settings API for older *-k8s-* builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, this feature landed in k8s-1.27: https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls.

If we add them like this, they'll still be in the settings API for older -k8s- builds.

Also correct - my thought was that these settings would be ignored/unused in k8s < 1.27, and only included in a kubelet-config in kubernetes-1.27+ packages. We'd call out this distinction on the bottlerocket.dev Settings Index

Open to suggestions on a better approach here, though

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it makes sense to include the settings and document that they are ignored in older versions. Adding settings gated by a feature flag caused a few issues when we did it for nvidia-device-plugin settings, and in this case I don't think it makes sense to add a kubernetes-1.27+ top-level setting.

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.

4 participants