Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for KillPod (0.42 sec)

  1. pkg/kubelet/container/sync_result.go

    func (r *SyncResult) Fail(err error, msg string) {
    	r.Error, r.Message = err, msg
    }
    
    // PodSyncResult is the summary result of SyncPod() and KillPod()
    type PodSyncResult struct {
    	// Result of different sync actions
    	SyncResults []*SyncResult
    	// Error encountered in SyncPod() and KillPod() that is not already included in SyncResults
    	SyncError error
    }
    
    // AddSyncResult adds multiple SyncResult to current PodSyncResult
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 19 15:48:08 UTC 2020
    - 4.6K bytes
    - Viewed (0)
  2. pkg/kubelet/container/testing/runtime_mock.go

    }
    
    // KillPod mocks base method.
    func (m *MockRuntime) KillPod(ctx context.Context, pod *v1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error {
    	m.ctrl.T.Helper()
    	ret := m.ctrl.Call(m, "KillPod", ctx, pod, runningPod, gracePeriodOverride)
    	ret0, _ := ret[0].(error)
    	return ret0
    }
    
    // KillPod indicates an expected call of KillPod.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 27K bytes
    - Viewed (0)
  3. pkg/kubelet/kuberuntime/kuberuntime_manager_test.go

    	podStatus, err := m.GetPodStatus(ctx, pod.UID, pod.Name, pod.Namespace)
    	require.NoError(t, err)
    	p := kubecontainer.ConvertPodStatusToRunningPod("", podStatus)
    	gracePeriod := int64(1)
    	err = m.KillPod(ctx, pod, p, &gracePeriod)
    	require.NoError(t, err)
    }
    
    func TestGetPodStatusWithNotFoundError(t *testing.T) {
    	ctx := context.Background()
    	fakeRuntime, _, m, err := createTestRuntimeManager()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 96K bytes
    - Viewed (0)
  4. pkg/kubelet/kuberuntime/kuberuntime_manager.go

    	UpdatePodResources bool
    }
    
    func (p podActions) String() string {
    	return fmt.Sprintf("KillPod: %t, CreateSandbox: %t, UpdatePodResources: %t, Attempt: %d, InitContainersToStart: %v, ContainersToStart: %v, EphemeralContainersToStart: %v,ContainersToUpdate: %v, ContainersToKill: %v",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 02:01:31 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  5. pkg/kubelet/container/testing/fake_runtime.go

    	if f.Err != nil {
    		result.Fail(f.Err)
    	}
    	return
    }
    
    func (f *FakeRuntime) KillPod(_ context.Context, pod *v1.Pod, runningPod kubecontainer.Pod, gracePeriodOverride *int64) error {
    	f.Lock()
    	defer f.Unlock()
    
    	f.CalledFunctions = append(f.CalledFunctions, "KillPod")
    	f.KilledPods = append(f.KilledPods, string(runningPod.ID))
    	for _, c := range runningPod.Containers {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 14 00:23:50 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  6. pkg/kubelet/container/runtime.go

    	SyncPod(ctx context.Context, pod *v1.Pod, podStatus *PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) PodSyncResult
    	// KillPod kills all the containers of a pod. Pod may be nil, running pod must not be.
    	// TODO(random-liu): Return PodSyncResult in KillPod.
    	// gracePeriodOverride if specified allows the caller to override the pod default grace period.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  7. pkg/kubelet/kubelet.go

    			p := kubecontainer.ConvertPodStatusToRunningPod(kl.getRuntime().Type(), podStatus)
    			if err := kl.killPod(ctx, pod, p, nil); err == nil {
    				if wait.Interrupted(err) {
    					return false, err
    				}
    				podKilled = true
    			} else {
    				klog.ErrorS(err, "KillPod failed", "pod", klog.KObj(pod), "podStatus", podStatus)
    			}
    		}
    		// Create and Update pod's Cgroups
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 126.1K bytes
    - Viewed (0)
  8. pkg/kubelet/kubelet_pods.go

    }
    
    // killPod instructs the container runtime to kill the pod. This method requires that
    // the pod status contains the result of the last syncPod, otherwise it may fail to
    // terminate newly created containers and sandboxes.
    func (kl *Kubelet) killPod(ctx context.Context, pod *v1.Pod, p kubecontainer.Pod, gracePeriodOverride *int64) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 101.2K bytes
    - Viewed (0)
  9. pkg/kubelet/kuberuntime/kuberuntime_container.go

    				changes.InitContainersToStart = append(changes.InitContainersToStart, i)
    			} else { // init container
    				if isInitContainerFailed(status) {
    					if !restartOnFailure {
    						changes.KillPod = true
    						changes.InitContainersToStart = nil
    						return false
    					}
    					changes.InitContainersToStart = append(changes.InitContainersToStart, i)
    					break
    				}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 54.7K bytes
    - Viewed (0)
  10. pkg/kubelet/kubelet_test.go

    		t.Fatalf("expected %v to be deleted, got %v", expected, actual)
    	}
    	fakeRuntime.AssertKilledPods([]string(nil))
    
    	// simulate Runtime.KillPod
    	fakeRuntime.PodList = nil
    
    	kubelet.HandlePodCleanups(ctx)
    	kubelet.HandlePodCleanups(ctx)
    	kubelet.HandlePodCleanups(ctx)
    
    	destroyCount := 0
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 106.9K bytes
    - Viewed (0)
Back to top