fix: use mirror-aware crictl prepulls
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Pull bootstrap images into containerd
|
||||
shell: |
|
||||
if /usr/local/bin/ctr -n k8s.io images ls -q | grep -Fx -- "{{ item }}" >/dev/null; then
|
||||
if /usr/local/bin/k3s crictl inspecti "{{ item }}" >/dev/null 2>&1; then
|
||||
echo "already present"
|
||||
exit 0
|
||||
fi
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
for attempt in 1 2 3 4 5 6 7 8 9 10; do
|
||||
echo "pull attempt ${attempt}: {{ item }}"
|
||||
if timeout 240s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
|
||||
if timeout 240s /usr/local/bin/k3s crictl pull "{{ item }}"; then
|
||||
echo "pulled image"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{{ cloud_init_wait.stderr | default('') }}
|
||||
when:
|
||||
- cloud_init_binary.rc == 0
|
||||
- cloud_init_wait.rc == 1 or 'status: error' in (cloud_init_wait.stdout | default(''))
|
||||
- "'status: error' in (cloud_init_wait.stdout | default(''))"
|
||||
|
||||
- name: Persist primary interface MTU for registry egress
|
||||
copy:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Pre-pull kube-vip bootstrap images into containerd
|
||||
shell: |
|
||||
if /usr/local/bin/ctr -n k8s.io images ls -q | grep -Fx -- "{{ item }}" >/dev/null; then
|
||||
if /usr/local/bin/k3s crictl inspecti "{{ item }}" >/dev/null 2>&1; then
|
||||
echo "already present"
|
||||
exit 0
|
||||
fi
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
for attempt in 1 2 3 4 5; do
|
||||
echo "pull attempt ${attempt}: {{ item }}"
|
||||
if timeout 180s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
|
||||
if timeout 180s /usr/local/bin/k3s crictl pull "{{ item }}"; then
|
||||
echo "pulled image"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Pull Rancher images into containerd
|
||||
shell: |
|
||||
if /usr/local/bin/ctr -n k8s.io images ls -q | grep -Fx -- "{{ item }}" >/dev/null; then
|
||||
if /usr/local/bin/k3s crictl inspecti "{{ item }}" >/dev/null 2>&1; then
|
||||
echo "already present"
|
||||
exit 0
|
||||
fi
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
for attempt in 1 2 3 4 5 6 7 8 9 10; do
|
||||
echo "pull attempt ${attempt}: {{ item }}"
|
||||
if timeout 240s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
|
||||
if timeout 240s /usr/local/bin/k3s crictl pull "{{ item }}"; then
|
||||
echo "pulled image"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user