Skip to content

Commit fbd15d1

Browse files
committed
small fixes in prepull element
1 parent 17d41a3 commit fbd15d1

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.env-1.30

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DISTR=noble
33

44
# Kubernetes with runtime
5-
DIB_KUBERNETES_VERSION=1.30.10
5+
DIB_KUBERNETES_VERSION=1.30.11
66
DIB_CRI_TOOLS_VERSION=1.32.0
77

88
# There are some crash issues (Cinder controller) with containerd 1.7.24+ and Calico CNI
@@ -17,5 +17,6 @@ DIB_NPD_VERSION=0.8.20
1717
DIB_CNI_PLUGINS_VERSION=1.5.1
1818

1919
# Prepull cni images (comment out the lines below to avoid pulling cni images)
20+
DIB_CLOUD_PROVIDER_TAG=v1.30.0
2021
DIB_CILIUM_TAG=v1.15.3
2122
DIB_CALICO_TAG=v3.29.0

.env-1.31

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DISTR=noble
33

44
# Kubernetes with runtime
5-
DIB_KUBERNETES_VERSION=1.31.6
5+
DIB_KUBERNETES_VERSION=1.31.7
66
DIB_CRI_TOOLS_VERSION=1.32.0
77

88
# There are some crash issues (Cinder controller) with containerd 1.7.24+ and Calico CNI
@@ -17,5 +17,6 @@ DIB_NPD_VERSION=0.8.20
1717
DIB_CNI_PLUGINS_VERSION=1.5.1
1818

1919
# Prepull cni images (comment out the lines below to avoid pulling cni images)
20+
DIB_CLOUD_PROVIDER_TAG=v1.31.0
2021
DIB_CILIUM_TAG=v1.15.3
2122
DIB_CALICO_TAG=v3.29.0

build-1.30.sh

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ docker run --rm --privileged --network host -v $imagedir:/image magnum-kubernete
1616
export DIB_CRI_TOOLS_VERSION="'$DIB_CRI_TOOLS_VERSION'" && \
1717
export DIB_NPD_VERSION="'$DIB_NPD_VERSION'" && \
1818
export DIB_RUNC_VERSION="'$DIB_RUNC_VERSION'" && \
19+
export DIB_CLOUD_PROVIDER_TAG="'$DIB_CLOUD_PROVIDER_TAG'" && \
1920
export DIB_CILIUM_TAG="'$DIB_CILIUM_TAG'" && \
2021
export DIB_CALICO_TAG="'$DIB_CALICO_TAG'" && \
2122
disk-image-create -x -t qcow2 \

build-1.31.sh

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ docker run --rm --privileged --network host -v $imagedir:/image magnum-kubernete
1616
export DIB_CRI_TOOLS_VERSION="'$DIB_CRI_TOOLS_VERSION'" && \
1717
export DIB_NPD_VERSION="'$DIB_NPD_VERSION'" && \
1818
export DIB_RUNC_VERSION="'$DIB_RUNC_VERSION'" && \
19+
export DIB_CLOUD_PROVIDER_TAG="'$DIB_CLOUD_PROVIDER_TAG'" && \
1920
export DIB_CILIUM_TAG="'$DIB_CILIUM_TAG'" && \
2021
export DIB_CALICO_TAG="'$DIB_CALICO_TAG'" && \
2122
disk-image-create -x -t qcow2 \

patch/prepull-images/post-install.d/90-prepull-images

+8-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ done
2626
crictl pull registry.k8s.io/provider-os/cinder-csi-plugin:v1.28.0
2727
crictl pull registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.3
2828
crictl pull registry.k8s.io/sig-storage/livenessprobe:v2.9.0
29-
crictl pull registry.k8s.io/provider-os/openstack-cloud-controller-manager:v1.28.0
29+
if [ ${DIB_CLOUD_PROVIDER_TAG:-""} ]; then
30+
crictl pull registry.k8s.io/provider-os/openstack-cloud-controller-manager:$DIB_CLOUD_PROVIDER_TAG
31+
fi
3032

3133
# Pre pull large cni images
3234
if [ ${DIB_CILIUM_TAG:-""} ]; then
@@ -39,12 +41,12 @@ if [ ${DIB_CALICO_TAG:-""} ]; then
3941
# crictl pull docker.io/calico/kube-controllers:$DIB_CALICO_TAG
4042
fi
4143

42-
# Optimization (trying to keep prepulled images with --no-unpack option)
44+
# Optimization (trying to keep some prepulled images with --no-unpack option)
4345
mkdir -p /tmp/pulledimages
44-
# exporting cni/openstack images to /tmp/pulledimages
45-
crictl images | grep -E -- 'cilium|calico|sig-storage|provider-os' | awk '{print "/tmp/pulledimages/"$3".tar " $1":"$2}' | xargs -L1 ctr -n k8s.io images export
46-
# deleting cni/openstack images
47-
crictl images | grep -E -- 'cilium|calico|sig-storage|provider-os' | awk '{print $3}' | xargs -n 1 crictl rmi
46+
# exporting cni images to /tmp/pulledimages
47+
crictl images | grep -E -- 'cilium|calico' | awk '{print "/tmp/pulledimages/"$3".tar " $1":"$2}' | xargs -L1 ctr -n k8s.io images export
48+
# deleting cni images
49+
crictl images | grep -E -- 'cilium|calico' | awk '{print $3}' | xargs -n 1 crictl rmi
4850
# reimporting images with no-unpack option
4951
ls -1 /tmp/pulledimages/* | xargs -L1 ctr -n k8s.io images import --no-unpack
5052
rm -rf /tmp/pulledimages

0 commit comments

Comments
 (0)