Skip to content

Commit b0bc704

Browse files
authored
Merge pull request #47 from ijc/linuxkit-bump
Bump to latest linuxkit hashes, cri beta.1 & Docker 17.12.
2 parents f445e8c + 3d5bf2f commit b0bc704

File tree

11 files changed

+62
-28
lines changed

11 files changed

+62
-28
lines changed

pkg/cri-containerd/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM linuxkit/alpine:07f7d136e427dc68154cd5edbb2b9576f9ac5213 AS build
1+
FROM linuxkit/alpine:4584958639b2378246371fe219f33b270667e22e AS build
22

33
RUN \
44
apk add \
@@ -15,7 +15,7 @@ ENV GOPATH=/go PATH=$PATH:/go/bin
1515

1616
ENV CRI_CONTAINERD_URL https://github.com/kubernetes-incubator/cri-containerd.git
1717
#ENV CRI_CONTAINERD_BRANCH pull/NNN/head
18-
ENV CRI_CONTAINERD_COMMIT v1.0.0-beta.0
18+
ENV CRI_CONTAINERD_COMMIT v1.0.0-beta.1
1919
RUN mkdir -p $GOPATH/src/github.com/kubernetes-incubator && \
2020
cd $GOPATH/src/github.com/kubernetes-incubator && \
2121
git clone $CRI_CONTAINERD_URL cri-containerd

pkg/kube-e2e-test/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM linuxkit/alpine:07f7d136e427dc68154cd5edbb2b9576f9ac5213 AS build
1+
FROM linuxkit/alpine:4584958639b2378246371fe219f33b270667e22e AS build
22

33
# When changing kubernetes_version remember to also update:
44
# - scripts/mk-image-cache-lst and run `make refresh-image-caches` from top-level
@@ -40,6 +40,7 @@ RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
4040
RUN apk add --no-cache --initdb -p /out \
4141
alpine-baselayout \
4242
bash \
43+
busybox \
4344
ca-certificates \
4445
curl \
4546
musl \
@@ -54,8 +55,6 @@ RUN cp _output/bin/e2e.test /out/usr/bin/e2e.test
5455
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
5556
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
5657

57-
RUN rmdir /out/var/run && ln -nfs /run /out/var/run
58-
5958
ADD in-cluster-config.yaml /out/etc/in-cluster-config.yaml
6059
ADD e2e.sh /out/usr/bin/e2e.sh
6160

pkg/kubelet/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM linuxkit/alpine:07f7d136e427dc68154cd5edbb2b9576f9ac5213 AS build
1+
FROM linuxkit/alpine:4584958639b2378246371fe219f33b270667e22e AS build
22

33
# When changing kubernetes_version remember to also update:
44
# - scripts/mk-image-cache-lst and run `make refresh-image-caches` from top-level
@@ -106,8 +106,6 @@ RUN cp $GOPATH/bin/critest /out/usr/bin/critest
106106
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
107107
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
108108

109-
RUN rmdir /out/var/run && ln -nfs /run /out/var/run
110-
111109
ADD kubelet.sh /out/usr/bin/kubelet.sh
112110
ADD kubeadm-init.sh /kubeadm-init.sh
113111
RUN sed -e "s/@KUBERNETES_VERSION@/${kubernetes_version}/g" </kubeadm-init.sh >/out/usr/bin/kubeadm-init.sh && chmod +x /out/usr/bin/kubeadm-init.sh

pkg/kubernetes-docker-image-cache-common/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM linuxkit/alpine:07f7d136e427dc68154cd5edbb2b9576f9ac5213 AS build
1+
FROM linuxkit/alpine:4584958639b2378246371fe219f33b270667e22e AS build
22

33
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
44
RUN apk add --no-cache --initdb -p /out \
@@ -8,8 +8,6 @@ RUN apk add --no-cache --initdb -p /out \
88
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
99
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
1010

11-
RUN rmdir /out/var/run && ln -nfs /run /out/var/run
12-
1311
FROM scratch
1412
WORKDIR /
1513
COPY --from=build /out /

pkg/kubernetes-docker-image-cache-control-plane/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM linuxkit/alpine:07f7d136e427dc68154cd5edbb2b9576f9ac5213 AS build
1+
FROM linuxkit/alpine:4584958639b2378246371fe219f33b270667e22e AS build
22

33
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
44
RUN apk add --no-cache --initdb -p /out \
@@ -8,8 +8,6 @@ RUN apk add --no-cache --initdb -p /out \
88
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
99
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
1010

11-
RUN rmdir /out/var/run && ln -nfs /run /out/var/run
12-
1311
FROM scratch
1412
WORKDIR /
1513
COPY --from=build /out /

scripts/update-linuxkit-hashes.sh

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ git clone $lkurl $tdir/lk
1010

1111
lkrev=$(git -C $tdir/lk show --oneline -s HEAD)
1212

13+
update_hash() {
14+
local tag=$1; shift
15+
echo "Updating to $tag"
16+
17+
image=${tag%:*}
18+
sed -i -e "s,$image:[[:xdigit:]]\{40\}\(-dirty\)\?,$tag,g" $@
19+
}
20+
21+
# First update alpine build bases
22+
23+
# Alpine base image does not use linuxkit pkg, grab the tag from versions.x86_64 instead.
24+
if [ ! -f "$tdir/lk/tools/alpine/versions.x86_64" ] ; then
25+
echo "tools/alpine lacks versions.x86_64 file" >&2
26+
exit 1
27+
fi
28+
tag=$(sed -n -e '1s,^\# \(linuxkit/alpine:[[:xdigit:]]\{40\}\)-amd64$,\1,p' $tdir/lk/tools/alpine/versions.x86_64)
29+
if [ ! -n "$tag" ] ; then
30+
echo "Failed to extract tools/alpine tag" >&2
31+
exit 1
32+
fi
33+
update_hash $tag pkg/*/Dockerfile
34+
1335
for i in $tdir/lk/pkg/* ; do
1436
if [ ! -d "$i" ] ; then
1537
continue
@@ -21,12 +43,25 @@ for i in $tdir/lk/pkg/* ; do
2143
fi
2244

2345
tag=$(linuxkit pkg show-tag "$i")
24-
echo "Updating to $tag"
25-
26-
image=${tag%:*}
27-
sed -i -e "s,$image:[[:xdigit:]]\{40\}\(-dirty\)\?,$tag,g" yml/*.yml
46+
update_hash "$tag" yml/*.yml
2847
done
2948

49+
# Kernel doesn't use `linuxkit pkg` and uses a different
50+
# tagging strategy, so we do it manually by extracting the
51+
# "recommended" one from the toplevel linuxkit.yml
52+
# example.
53+
# TODO: add a target to kernel/Makefile which will show
54+
# the recommended kernel.
55+
tag=$(sed -n -e 's,^\s*image: \(linuxkit/kernel:.\+\)\s*,\1,p' $tdir/lk/linuxkit.yml)
56+
if [ ! -n "$tag" ] ; then
57+
echo "Failed to extract kernel tag" >&2
58+
exit 1
59+
fi
60+
# Not update_hash since the tag is not a hash in this case
61+
62+
echo "Updating to $tag"
63+
sed -i -e "s,linuxkit/kernel:.\+,$tag,g" yml/*.yml
64+
3065
# We manually construct the S-o-b because -F strips the trailing blank
3166
# lines, meaning that with -s there is no blank between the "Commit:
3267
# ..." and the S-o-b.
@@ -41,4 +76,10 @@ Commit: $lkrev
4176
Signed-off-by: $uname <$email>
4277
EOF
4378

44-
git commit --only -F $tdir/commit-msg yml/*.yml
79+
git commit --only -F $tdir/commit-msg yml/*.yml pkg/*/Dockerfile
80+
81+
# Now update for the result of changes to pkg/*/Dockerfile, this is
82+
# defered until now so we get the new hash instead of the old hash
83+
# with a -dirty suffix.
84+
make update-hashes
85+
git commit --amend --only --no-edit yml/*.yml

ssh_into_kubelet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ case $(uname -s) in
1616
ijc25/alpine-ssh"
1717
;;
1818
esac
19-
exec $ssh $sshopts -t root@"$1" ctr tasks exec --tty --exec-id ssh-$(hostname)-$$ kubelet ash -l
19+
exec $ssh $sshopts -t root@"$1" ctr --namespace services.linuxkit tasks exec --tty --exec-id ssh-$(hostname)-$$ kubelet ash -l

yml/cri-containerd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
- name: cri-containerd
3-
image: linuxkit/cri-containerd:35f4761216380fe80a120ba7fa2d52545847cc13
3+
image: linuxkit/cri-containerd:6d7a253f3e69c506c76f0a0dfa32b7c307b0c9ee
44
cgroupsPath: podruntime/cri-containerd
55
files:
66
- path: /etc/kubelet.sh.conf

yml/docker-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
services:
22
- name: kubernetes-docker-image-cache-control-plane
3-
image: linuxkit/kubernetes-docker-image-cache-control-plane:3606d4714909c0916f68f2ac96fc728c4d9de316
3+
image: linuxkit/kubernetes-docker-image-cache-control-plane:d486ce15b5dedc742684849dd9d61b8d59d9624b
44
cgroupsPath: podruntime/control-cache

yml/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
- name: docker
3-
image: docker:17.11.0-ce-dind
3+
image: docker:17.12.0-ce-dind
44
capabilities:
55
- all
66
pid: host
@@ -24,7 +24,7 @@ services:
2424
mkdir: ["/var/lib/kubeadm", "/var/lib/cni/conf", "/var/lib/cni/bin", "/var/lib/kubelet-plugins"]
2525
cgroupsPath: podruntime/docker
2626
- name: kubernetes-docker-image-cache-common
27-
image: linuxkit/kubernetes-docker-image-cache-common:434f337a5338776f67ab34e2327489c1368f2559
27+
image: linuxkit/kubernetes-docker-image-cache-common:9d0f7a513998ae3fdaf9089655aa9e9118e938f1
2828
cgroupsPath: podruntime/common-cache
2929
files:
3030
- path: /etc/kubelet.sh.conf

0 commit comments

Comments
 (0)