Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for PodSandboxChanged (0.76 sec)

  1. pkg/kubelet/kuberuntime/util/util.go

    	runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
    	"k8s.io/klog/v2"
    	kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
    )
    
    // PodSandboxChanged checks whether the spec of the pod is changed and returns
    // (changed, new attempt, original sandboxID if exist).
    func PodSandboxChanged(pod *v1.Pod, podStatus *kubecontainer.PodStatus) (bool, uint32, string) {
    	if len(podStatus.SandboxStatuses) == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 13 23:14:48 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. pkg/kubelet/kuberuntime/util/util_test.go

    					},
    				},
    			},
    			expectedChanged:   false,
    			expectedAttempt:   0,
    			expectedSandboxID: "sandboxID1",
    		},
    	} {
    		t.Run(desc, func(t *testing.T) {
    			changed, attempt, id := PodSandboxChanged(test.pod, test.status)
    			require.Equal(t, test.expectedChanged, changed)
    			require.Equal(t, test.expectedAttempt, attempt)
    			require.Equal(t, test.expectedSandboxID, id)
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 13 23:14:48 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. pkg/kubelet/status/generate.go

    		Status: v1.ConditionTrue,
    	}
    }
    
    func GeneratePodReadyToStartContainersCondition(pod *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodCondition {
    	newSandboxNeeded, _, _ := runtimeutil.PodSandboxChanged(pod, podStatus)
    	// if a new sandbox does not need to be created for a pod, it indicates that
    	// a sandbox for the pod with networking configured already exists.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 12 15:18:11 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  4. pkg/kubelet/kuberuntime/kuberuntime_manager.go

    	klog.V(5).InfoS("Syncing Pod", "pod", klog.KObj(pod))
    
    	createPodSandbox, attempt, sandboxID := runtimeutil.PodSandboxChanged(pod, podStatus)
    	changes := podActions{
    		KillPod:           createPodSandbox,
    		CreateSandbox:     createPodSandbox,
    		SandboxID:         sandboxID,
    		Attempt:           attempt,
    		ContainersToStart: []int{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 02:01:31 UTC 2024
    - 64.7K bytes
    - Viewed (0)
Back to top