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

build the pause image from upstream source and use as the default #3940

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

tzneal
Copy link
Contributor

@tzneal tzneal commented May 3, 2024

Description of changes:

Builds the pause image from the Kubernetes source into the image.

Testing done:

Ran an instance with no pod-infra-container-image specified, and with one specified:

bash-5.1# journalctl --facility=1
May 06 18:59:42 localhost root[5061]: The setting settings.kubernetes.pod-infra-container-image is deprecated and has no effect. It will be removed in future versions of Bottlerocket.
May 06 19:05:51 i-00e97c60c2abba780.us-west-2.compute.internal root[34230]: The setting settings.kubernetes.pod-infra-container-image is deprecated and has no effect. It will be removed in future versions of Bottlerocket.
bash-5.1# journalctl  -u kubelet | head
May 06 18:59:43 i-00e97c60c2abba780.us-west-2.compute.internal systemd[1]: Starting Kubelet...
May 06 18:59:43 i-00e97c60c2abba780.us-west-2.compute.internal ctr[5426]: unpacking localhost/kubernetes/pause:0.1.0 (sha256:dc510f415dfb132b9359fc451408733862c89b0e10e3ffbdeb6e36be50148a54)...done
May 06 18:59:43 i-00e97c60c2abba780.us-west-2.compute.internal ctr[5478]: io.cri-containerd.pinned=pinned,io.cri-containerd.image=managed
May 06 18:59:44 i-00e97c60c2abba780.us-west-2.compute.internal kubelet[5492]: Flag --container-runtime-endpoint has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
May 06 18:59:44 i-00e97c60c2abba780.us-west-2.compute.internal kubelet[5492]: Flag --containerd has been deprecated, This is a cadvisor flag that was mistakenly registered with the Kubelet. Due to legacy concerns, it will follow the standard CLI deprecation timeline before being removed.
May 06 18:59:44 i-00e97c60c2abba780.us-west-2.compute.internal kubelet[5492]: Flag --register-with-taints has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
May 06 18:59:44 i-00e97c60c2abba780.us-west-2.compute.internal kubelet[5492]: Flag --pod-infra-container-image has been deprecated, will be removed in a future release. Image garbage collector will get sandbox image information from CRI.
May 06 18:59:44 i-00e97c60c2abba780.us-west-2.compute.internal kubelet[5492]: I0506 18:59:44.811726    5492 server.go:204] "--pod-infra-container-image will not be pruned by the image garbage collector in kubelet and should also be set in the remote runtime"
May 06 18:59:44 i-00e97c60c2abba780.us-west-2.compute.internal kubelet[5492]: I0506 18:59:44.821784    5492 server.go:487] "Kubelet version" kubeletVersion="v1.29.1-eks-61c0bbb"
May 06 18:59:44 i-00e97c60c2abba780.us-west-2.compute.internal kubelet[5492]: I0506 18:59:44.821820    5492 server.go:489] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK="

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.

@tzneal
Copy link
Contributor Author

tzneal commented May 3, 2024

Putting up to get some thoughts on the approach before I replicate this to the other K8s versions.

packages/kubernetes-1.29/kubernetes-1.29.spec Outdated Show resolved Hide resolved
packages/kubernetes-1.29/kubernetes-1.29.spec Outdated Show resolved Hide resolved
packages/kubernetes-1.29/kubernetes-1.29.spec Outdated Show resolved Hide resolved
packages/kubernetes-1.29/pause-config.json Outdated Show resolved Hide resolved
packages/kubernetes-1.29/pause-manifest.json Outdated Show resolved Hide resolved
packages/kubernetes-1.29/prestart-load-pause-ctr.conf Outdated Show resolved Hide resolved
packages/kubernetes-1.29/prestart-load-pause-ctr.conf Outdated Show resolved Hide resolved
sources/models/shared-defaults/kubernetes-aws.toml Outdated Show resolved Hide resolved
sources/models/shared-defaults/kubernetes-aws.toml Outdated Show resolved Hide resolved
@tzneal tzneal force-pushed the build-pause-image-with-k8s branch from 728a412 to 0a1a244 Compare May 6, 2024 19:09
@tzneal
Copy link
Contributor Author

tzneal commented May 6, 2024

I left the pause-prefix code in for now as its referenced in migrations:

sources/api/migration/migrations/v1.16.0/schnauzer-v2-generators/src/main.rs
58:                new_val: "schnauzer-v2 render --requires 'aws@v1' --requires 'kubernetes@v1(helpers=[pause-prefix])' --template '{{ pause-prefix settings.aws.region }}/eks/pause:3.1-eksbuild.1'",

sources/api/migration/migrations/archived/v1.1.0/schnauzer-paws/src/main.rs
8:    "{{ pause-prefix settings.aws.region }}/eks/pause-{{ goarch os.arch }}:3.1";

But maybe its good to be removed from there as well?

Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

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

All the code and config changes look good to me. The remaining piece is the migrations, which you're welcome to tackle or punt to one of the developers more familiar with this dark corner of Bottlerocket.

@bcressey
Copy link
Contributor

I left the pause-prefix code in for now as its referenced in migrations:

We're overdue for a migrations archival - relocating some of the newer migrations to sources/migration/migrations/archived where they'll no longer be built. After that we can clean up this part of schnauzer. Agreed that it's probably better as a backlog issue than worrying about it here.

@tzneal tzneal force-pushed the build-pause-image-with-k8s branch from 0a1a244 to a71c49d Compare May 15, 2024 13:33
@tzneal tzneal force-pushed the build-pause-image-with-k8s branch from a71c49d to 887baef Compare May 15, 2024 13:39
@tzneal tzneal force-pushed the build-pause-image-with-k8s branch from 887baef to 39a512f Compare May 23, 2024 13:40
Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

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

LGTM. Might be good to tweak the commit titles a bit:

settings: use built-in pause container image for k8s
kubernetes-*: switch to built-in pause container image

(The k8s commits can be kept separate or squashed into one, up to you.)

@tzneal tzneal force-pushed the build-pause-image-with-k8s branch from 39a512f to 04558e6 Compare May 23, 2024 18:13
Copy link
Member

@larvacea larvacea left a comment

Choose a reason for hiding this comment

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

lgtm. I am happy to get a second (or so) back from pulling this image from ECR.

@tzneal tzneal force-pushed the build-pause-image-with-k8s branch from 04558e6 to 27f758b Compare June 4, 2024 11:43
@bcressey bcressey merged commit 9b04b6e into bottlerocket-os:develop Jun 6, 2024
33 checks passed
@tzneal tzneal deleted the build-pause-image-with-k8s branch June 7, 2024 16:03
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.

None yet

5 participants