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

Fork all files needed for kindbase and specify snapshot #9225

Closed
wants to merge 2 commits into from

Conversation

afbjorklund
Copy link
Collaborator

This is for reference, to be able to combine them

Copied from https://github.com/kubernetes-sigs/kind/tree/2c0eee40/images/base

Currently the "entrypoint" is overridden with a more recent, and modified, version:

https://github.com/kubernetes/minikube/blob/v1.13.0/deploy/kicbase/entrypoint

Changed from latest greatest 20.04 to a snapshot

-FROM ubuntu:20.04
+FROM ubuntu:focal-20200423

Upstream KIND has moved away from Ubuntu LTS and moved on to 20.10 already

Fixes #7788


There is no difference to the actual size being done here, that is a separate story.

REPOSITORY                     TAG                           IMAGE ID            CREATED             SIZE
local/kindbase                 v20200430-2c0eee40-snapshot   9e379cea8e97        6 minutes ago       284MB
gcr.io/k8s-minikube/kindbase   v20200430-2c0eee40            9e379cea8e97        6 minutes ago       284MB
gcr.io/k8s-minikube/kindbase   v20200430-2c0eee40-snapshot   9e379cea8e97        6 minutes ago       284MB
kindest/base                   v20200430-2c0eee40            feff3ae05a74        4 months ago        282MB

Here is the result that comes from rebuilding the image with later apt packages:


-----Apt-----

Packages found only in kindest/base:v20200430-2c0eee40: None

Packages found only in local/kindbase:v20200430-2c0eee40-snapshot: None

Version differences:
PACKAGE                   IMAGE1 (kindest/base:v20200430-2c0eee40)        IMAGE2 (local/kindbase:v20200430-2c0eee40-snapshot)
-bash                     5.0-6ubuntu1, 1.6M                              5.0-6ubuntu1.1, 1.6M
-ca-certificates          20190110ubuntu1, 384K                           20190110ubuntu1.1, 382K
-curl                     7.68.0-1ubuntu2, 401K                           7.68.0-1ubuntu2.2, 401K
-libapparmor1             2.13.3-7ubuntu5, 167K                           2.13.3-7ubuntu5.1, 167K
-libcurl4                 7.68.0-1ubuntu2, 688K                           7.68.0-1ubuntu2.2, 688K
-libjson-c4               0.13.1 dfsg-7, 92K                              0.13.1 dfsg-7ubuntu0.3, 92K
-libldap-2.4-2            2.4.49 dfsg-2ubuntu1, 522K                      2.4.49 dfsg-2ubuntu1.3, 522K
-libldap-common           2.4.49 dfsg-2ubuntu1, 101K                      2.4.49 dfsg-2ubuntu1.3, 101K
-libseccomp2              2.4.3-1ubuntu1, 348K                            2.4.3-1ubuntu3.20.04.3, 348K
-libsqlite3-0             3.31.1-4, 1.3M                                  3.31.1-4ubuntu0.2, 1.3M
-libssh-4                 0.9.3-2ubuntu2, 490K                            0.9.3-2ubuntu2.1, 490K
-libsystemd0              245.4-4ubuntu3, 860K                            245.4-4ubuntu3.2, 862K
-libudev1                 245.4-4ubuntu3, 326K                            245.4-4ubuntu3.2, 328K
-systemd                  245.4-4ubuntu3, 14.7M                           245.4-4ubuntu3.2, 14.7M
-systemd-timesyncd        245.4-4ubuntu3, 235K                            245.4-4ubuntu3.2, 237K
-udev                     245.4-4ubuntu3, 8.9M                            245.4-4ubuntu3.2, 8.9M


-----File-----

These entries have been added to kindest/base:v20200430-2c0eee40: None

These entries have been deleted from kindest/base:v20200430-2c0eee40:
FILE                                                                 SIZE
/etc/ssl/certs/157753a5.0                                            unknown
/etc/ssl/certs/AddTrust_External_Root.pem                            unknown
/usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt        1.5K

These entries have been changed between kindest/base:v20200430-2c0eee40 and local/kindbase:v20200430-2c0eee40-snapshot:
FILE                                                                   SIZE1         SIZE2
/usr/lib/udev/hwdb.bin                                                 9.5M          9.5M
/usr/lib/systemd/libsystemd-shared-245.so                              2.3M          2.3M
/usr/lib/systemd/systemd-networkd                                      2.1M          2.1M
/usr/lib/systemd/systemd                                               1.5M          1.5M
/usr/bin/systemd-analyze                                               1.5M          1.5M
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6                          1.2M          1.2M
/usr/bin/bash                                                          1.1M          1.1M
/usr/bin/systemctl                                                     965.1K        965.1K
/usr/bin/udevadm                                                       911K          911K
/usr/lib/systemd/systemd-udevd                                         718.4K        718.4K
/usr/lib/x86_64-linux-gnu/libsystemd.so.0.28.0                         684.7K        684.7K
/usr/lib/x86_64-linux-gnu/libcurl.so.4.6.0                             574.6K        574.6K
/usr/lib/x86_64-linux-gnu/libssh.so.4.8.4                              435.5K        435.5K
/usr/lib/systemd/systemd-resolved                                      394.1K        394.1K
/usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.12                     331.5K        331.5K
/usr/lib/x86_64-linux-gnu/libseccomp.so.2.4.3                          326.4K        326.4K
/usr/bin/curl                                                          234.2K        234.2K
/etc/ssl/certs/ca-certificates.crt                                     195.4K        193.9K
/usr/lib/x86_64-linux-gnu/libudev.so.1.6.17                            170.2K        170.2K
/usr/lib/systemd/systemd-journald                                      154.1K        154.1K
/var/lib/dpkg/status                                                   138.7K        138.8K
/var/lib/dpkg/status-old                                               137.8K        137.9K
/usr/bin/systemd-hwdb                                                  102.4K        102.4K
/usr/lib/udev/fido_id                                                  90.4K         90.4K
/usr/lib/systemd/boot/efi/systemd-bootx64.efi                          89.4K         89.4K
/usr/lib/udev/scsi_id                                                  74.7K         74.7K
/usr/lib/udev/hwdb.d/60-keyboard.hwdb                                  74.3K         74.4K
/usr/lib/udev/cdrom_id                                                 70.2K         70.2K
/usr/lib/x86_64-linux-gnu/libjson-c.so.4.0.0                           66.3K         66.3K
/usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.12                       62.4K         62.4K
/usr/lib/udev/ata_id                                                   58.2K         58.2K
/usr/lib/systemd/boot/efi/linuxx64.efi.stub                            54.4K         54.4K
/usr/lib/systemd/systemd-timesyncd                                     54.1K         54.1K
/usr/lib/systemd/systemd-shutdown                                      50.1K         50.1K
/var/lib/dpkg/info/systemd.md5sums                                     38.8K         38.8K
/usr/lib/systemd/system-generators/systemd-gpt-auto-generator          34K           34K
/usr/lib/systemd/system-generators/systemd-cryptsetup-generator        30.2K         30.2K
/usr/lib/systemd/systemd-socket-proxyd                                 30.1K         30.1K
/usr/bin/systemd-tty-ask-password-agent                                30.1K         30.1K
/usr/lib/systemd/systemd-growfs                                        22.1K         22.1K
/usr/lib/udev/v4l_id                                                   18.1K         18.1K
/var/lib/dpkg/info/bash.preinst                                        18K           18K
/usr/lib/udev/mtd_probe                                                18K           18K
/var/lib/dpkg/info/ca-certificates.md5sums                             14.3K         14.2K
/usr/bin/clear_console                                                 14.2K         14.2K
/usr/lib/systemd/systemd-makefs                                        14K           14K
/usr/lib/systemd/systemd-volatile-root                                 14K           14K
/usr/lib/systemd/systemd-reply-password                                14K           14K
/var/lib/dpkg/info/ca-certificates.list                                10.2K         10.1K
/var/lib/dpkg/info/ca-certificates.config                              9.2K          9.2K
/var/cache/ldconfig/aux-cache                                          7.9K          7.9K
/usr/bin/bashbug                                                       6.6K          6.6K
/var/lib/dpkg/info/udev.md5sums                                        6.2K          6.2K
/etc/ca-certificates.conf                                              5.6K          5.5K
/var/lib/dpkg/info/udev.postinst                                       3K            3.2K
/usr/share/initramfs-tools/hooks/udev                                  1.7K          1.7K
/var/lib/dpkg/info/bash.md5sums                                        1.4K          1.4K
/var/lib/dpkg/info/systemd-timesyncd.md5sums                           651B          651B
/etc/shadow-                                                           613B          613B
/etc/shadow                                                            613B          613B
/usr/lib/udev/rules.d/40-vm-hotadd.rules                               613B          655B
/run/systemd/resolve/stub-resolv.conf                                  610B          68B
/var/lib/dpkg/info/bash.postinst                                       608B          609B
/var/lib/dpkg/info/bash.postrm                                         505B          506B
/var/lib/dpkg/info/libldap-2.4-2:amd64.md5sums                         472B          472B
/var/lib/dpkg/info/libjson-c4:amd64.md5sums                            363B          363B
/var/lib/dpkg/info/libssh-4:amd64.md5sums                              361B          361B
/var/lib/dpkg/info/libapparmor1:amd64.md5sums                          307B          307B
/var/lib/dpkg/info/libsqlite3-0:amd64.md5sums                          306B          306B
/var/lib/dpkg/info/libcurl4:amd64.md5sums                              292B          292B
/var/lib/dpkg/info/curl.md5sums                                        246B          246B
/var/lib/dpkg/info/libseccomp2:amd64.md5sums                           229B          229B
/var/lib/dpkg/info/libsystemd0:amd64.md5sums                           226B          226B
/var/lib/dpkg/info/libldap-common.md5sums                              224B          224B
/var/lib/dpkg/info/libudev1:amd64.md5sums                              217B          217B
/var/lib/dpkg/info/libldap-2.4-2:amd64.triggers                        72B           73B
/var/lib/dpkg/info/libjson-c4:amd64.triggers                           72B           73B
/etc/machine-id                                                        33B           33B

This can be used as a refactoring base, together with PR #9135, to combine into one image...

Avoiding the intermediate steps for containerd makes the image smaller and more maintainable.

This is for reference, to be able to combine them
Also fix the 19.10 comment, it hadn't been updated
@afbjorklund afbjorklund requested a review from medyagh September 12, 2020 10:58
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 12, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 12, 2020
@afbjorklund
Copy link
Collaborator Author

---------------- 4 Failures :( ----------------------------
[
"TestErrorSpam",
"TestMultiNode/serial/RestartMultiNode",
"TestInsufficientStorage",
"TestNetworkPlugins/group/calico/DNS"
]

Not sure what those were all about... Flakes ?

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

do we really need to bring the kind base docker file ? I feel like it is better to just strart from ubuntu

@@ -47,6 +48,7 @@ BUILD_IMAGE ?= us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:v$(GO_VERSIO
ISO_BUILD_IMAGE ?= $(REGISTRY)/buildroot-image
KVM_BUILD_IMAGE ?= $(REGISTRY)/kvm-build-image:$(GO_VERSION)

KIND_BASE_IMAGE_GCR ?= $(REGISTRY)/kindbase:$(KIND_VERSION)
Copy link
Member

Choose a reason for hiding this comment

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

this probably makes it more confusing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As I mentioned above, it was a refactoring base

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Trying do all changes at once (like in the previous PR), makes it much harder to test - or see what happened.

Hard enough to see what changed between the KIND entrypoint and the new KIC entrypoint, if you ask me ?

@afbjorklund
Copy link
Collaborator Author

But I think my plan is backfiring since neither this PR (#9225) or the previous PR (#9135) passes the regression tests...

Despite not really changing much, they still fail. I suspect that changing nothing would also fail, but that's just a theory.

@tstromberg
Copy link
Contributor

I tested this locally using:

make kind-base-image
docker build -t kicbase:experiment deploy/kicbase; minikube delete; minikube start --base-image=kicbase:experiment --driver=docker

and it seems to work properly.

@afbjorklund
Copy link
Collaborator Author

I tested this locally using:

make kind-base-image
docker build -t kicbase:experiment deploy/kicbase; minikube delete; minikube start --base-image=kicbase:experiment --driver=docker

and it seems to work properly.

Yeah, that is the usual story...

@medyagh medyagh closed this Sep 29, 2020
@afbjorklund
Copy link
Collaborator Author

Included in PR #9330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move off kindbase image
4 participants