Merge pull request #135807 from carlory/fix-kubeadm-3108

kubeadm: remove --pod-infra-container-image flag from the unwantedFlags list
This commit is contained in:
Kubernetes Prow Robot 2025-12-21 20:32:30 -08:00 committed by GitHub
commit 3bde8d89a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,11 +48,7 @@ func runPostUpgrade(c workflow.RunData) error {
// Rewrite the kubelet env file without unwanted flags to disk and print the remaining flags instead of dry-running.
// If not dry-running, the kubelet env file will be backed up to the /etc/kubernetes/tmp/ dir, so that it could be
// recovered if anything goes wrong.
unwantedFlags := []string{
// The flag has been deprecated and no longer served a purpose in the kubelet as the logic was migrated to CRI.
// TODO: Remove it from this list in 1.36: https://github.com/kubernetes/kubeadm/issues/3108
"pod-infra-container-image",
}
unwantedFlags := []string{}
err := upgrade.RemoveKubeletArgsFromFile(data.KubeletDir(), data.KubeConfigDir(), unwantedFlags, data.DryRun(), data.OutputWriter())
if err != nil {
return err