Skip to content

Commit d6833ff

Browse files
authored
Merge pull request #3661 from chrischdi/pr-fix-1-35-kubelet-pod-infra-container-image
🌱 CI: clear /etc/sysconfig/kubelet to ensure --pod-infra-container-image is not set
2 parents 3e6b03e + f3ae313 commit d6833ff

File tree

14 files changed

+144
-0
lines changed

14 files changed

+144
-0
lines changed

test/e2e/data/infrastructure-vsphere-govmomi/main/base/patch-k8s-install-script-kcp.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@
9191
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9292
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9393
done
94+
95+
# TODO: remove once we use k8s v1.35 image-builder templates.
96+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
97+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
98+
echo "" > /etc/sysconfig/kubelet || true
99+
echo "" > /etc/default/kubelet || true
94100
fi
95101
echo "* checking binary versions"
96102
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-govmomi/main/base/patch-k8s-install-script-kct.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@
9494
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9595
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9696
done
97+
98+
# TODO: remove once we use k8s v1.35 image-builder templates.
99+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
100+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
101+
echo "" > /etc/sysconfig/kubelet || true
102+
echo "" > /etc/default/kubelet || true
97103
fi
98104
echo "* checking binary versions"
99105
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-govmomi/main/clusterclass/patch-k8s-install-script.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9797
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9898
done
99+
100+
# TODO: remove once we use k8s v1.35 image-builder templates.
101+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
102+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
103+
echo "" > /etc/sysconfig/kubelet || true
104+
echo "" > /etc/default/kubelet || true
99105
fi
100106
echo "* checking binary versions"
101107
echo "ctr version: " "$(ctr version)"
@@ -203,6 +209,12 @@
203209
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
204210
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
205211
done
212+
213+
# TODO: remove once we use k8s v1.35 image-builder templates.
214+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
215+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
216+
echo "" > /etc/sysconfig/kubelet || true
217+
echo "" > /etc/default/kubelet || true
206218
fi
207219
echo "* checking binary versions"
208220
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-govmomi/v1.11/clusterclass/patch-k8s-install-script.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9797
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9898
done
99+
100+
# TODO: remove once we use k8s v1.35 image-builder templates.
101+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
102+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
103+
echo "" > /etc/sysconfig/kubelet || true
104+
echo "" > /etc/default/kubelet || true
99105
fi
100106
echo "* checking binary versions"
101107
echo "ctr version: " "$(ctr version)"
@@ -203,6 +209,12 @@
203209
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
204210
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
205211
done
212+
213+
# TODO: remove once we use k8s v1.35 image-builder templates.
214+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
215+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
216+
echo "" > /etc/sysconfig/kubelet || true
217+
echo "" > /etc/default/kubelet || true
206218
fi
207219
echo "* checking binary versions"
208220
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-govmomi/v1.12/clusterclass/patch-k8s-install-script.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9797
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9898
done
99+
100+
# TODO: remove once we use k8s v1.35 image-builder templates.
101+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
102+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
103+
echo "" > /etc/sysconfig/kubelet || true
104+
echo "" > /etc/default/kubelet || true
99105
fi
100106
echo "* checking binary versions"
101107
echo "ctr version: " "$(ctr version)"
@@ -203,6 +209,12 @@
203209
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
204210
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
205211
done
212+
213+
# TODO: remove once we use k8s v1.35 image-builder templates.
214+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
215+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
216+
echo "" > /etc/sysconfig/kubelet || true
217+
echo "" > /etc/default/kubelet || true
206218
fi
207219
echo "* checking binary versions"
208220
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-govmomi/v1.13/clusterclass/patch-k8s-install-script.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9797
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9898
done
99+
100+
# TODO: remove once we use k8s v1.35 image-builder templates.
101+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
102+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
103+
echo "" > /etc/sysconfig/kubelet || true
104+
echo "" > /etc/default/kubelet || true
99105
fi
100106
echo "* checking binary versions"
101107
echo "ctr version: " "$(ctr version)"
@@ -203,6 +209,12 @@
203209
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
204210
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
205211
done
212+
213+
# TODO: remove once we use k8s v1.35 image-builder templates.
214+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
215+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
216+
echo "" > /etc/sysconfig/kubelet || true
217+
echo "" > /etc/default/kubelet || true
206218
fi
207219
echo "* checking binary versions"
208220
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-govmomi/v1.14/clusterclass/patch-k8s-install-script.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9797
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9898
done
99+
100+
# TODO: remove once we use k8s v1.35 image-builder templates.
101+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
102+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
103+
echo "" > /etc/sysconfig/kubelet || true
104+
echo "" > /etc/default/kubelet || true
99105
fi
100106
echo "* checking binary versions"
101107
echo "ctr version: " "$(ctr version)"
@@ -203,6 +209,12 @@
203209
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
204210
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
205211
done
212+
213+
# TODO: remove once we use k8s v1.35 image-builder templates.
214+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
215+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
216+
echo "" > /etc/sysconfig/kubelet || true
217+
echo "" > /etc/default/kubelet || true
206218
fi
207219
echo "* checking binary versions"
208220
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-supervisor/main/base/patch-k8s-install-script-kcp.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@
9191
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9292
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9393
done
94+
95+
# TODO: remove once we use k8s v1.35 image-builder templates.
96+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
97+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
98+
echo "" > /etc/sysconfig/kubelet || true
99+
echo "" > /etc/default/kubelet || true
94100
fi
95101
echo "* checking binary versions"
96102
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-supervisor/main/base/patch-k8s-install-script-kct.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@
9494
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9595
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9696
done
97+
98+
# TODO: remove once we use k8s v1.35 image-builder templates.
99+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
100+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
101+
echo "" > /etc/sysconfig/kubelet || true
102+
echo "" > /etc/default/kubelet || true
97103
fi
98104
echo "* checking binary versions"
99105
echo "ctr version: " "$(ctr version)"

test/e2e/data/infrastructure-vsphere-supervisor/main/clusterclass/patch-k8s-install-script.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9797
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
9898
done
99+
100+
# TODO: remove once we use k8s v1.35 image-builder templates.
101+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
102+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
103+
echo "" > /etc/sysconfig/kubelet || true
104+
echo "" > /etc/default/kubelet || true
99105
fi
100106
echo "* checking binary versions"
101107
echo "ctr version: " "$(ctr version)"
@@ -203,6 +209,12 @@
203209
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
204210
$${SUDO} ctr -n k8s.io images tag "$${IMAGE_REGISTRY_PREFIX}/$${CI_CONTAINER}-amd64:$${KUBERNETES_VERSION//+/_}" "gcr.io/k8s-staging-ci-images/$${CI_CONTAINER}:$${KUBERNETES_VERSION//+/_}"
205211
done
212+
213+
# TODO: remove once we use k8s v1.35 image-builder templates.
214+
# Note: This is a temporary fix to ensure the flag --pod-infra-container-image is not set which was removed in k8s v1.35 and deprecated for a long time.
215+
echo "Clearing /etc/sysconfig/kubelet and/or /etc/default/kubelet if they exist"
216+
echo "" > /etc/sysconfig/kubelet || true
217+
echo "" > /etc/default/kubelet || true
206218
fi
207219
echo "* checking binary versions"
208220
echo "ctr version: " "$(ctr version)"

0 commit comments

Comments
 (0)