mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #99476 from neolit123/1.21-pass-pod-infra-to-all-cr
kubeadm: pass pod-infra-container-image for all CRs
This commit is contained in:
commit
3abeb174c4
@ -79,14 +79,17 @@ func buildKubeletArgMapCommon(opts kubeletFlagsOpts) map[string]string {
|
||||
if opts.nodeRegOpts.CRISocket == constants.DefaultDockerCRISocket {
|
||||
// These flags should only be set when running docker
|
||||
kubeletFlags["network-plugin"] = "cni"
|
||||
if opts.pauseImage != "" {
|
||||
kubeletFlags["pod-infra-container-image"] = opts.pauseImage
|
||||
}
|
||||
} else {
|
||||
kubeletFlags["container-runtime"] = "remote"
|
||||
kubeletFlags["container-runtime-endpoint"] = opts.nodeRegOpts.CRISocket
|
||||
}
|
||||
|
||||
// This flag passes the pod infra container image (e.g. "pause" image) to the kubelet
|
||||
// and prevents its garbage collection
|
||||
if opts.pauseImage != "" {
|
||||
kubeletFlags["pod-infra-container-image"] = opts.pauseImage
|
||||
}
|
||||
|
||||
if opts.registerTaintsUsingFlags && opts.nodeRegOpts.Taints != nil && len(opts.nodeRegOpts.Taints) > 0 {
|
||||
taintStrs := []string{}
|
||||
for _, taint := range opts.nodeRegOpts.Taints {
|
||||
|
Loading…
Reference in New Issue
Block a user