Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for RemoveContainers (0.2 sec)

  1. cmd/kubeadm/app/cmd/phases/reset/cleanupnode.go

    		}
    	}
    
    	return nil
    }
    
    func removeContainers(criSocketPath string) error {
    	containerRuntime := utilruntime.NewContainerRuntime(criSocketPath)
    	if err := containerRuntime.Connect(); err != nil {
    		return err
    	}
    	containers, err := containerRuntime.ListKubeContainers()
    	if err != nil {
    		return err
    	}
    	return containerRuntime.RemoveContainers(containers)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 06:58:01 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/runtime/runtime.go

    	}
    
    	pods := []string{}
    	for _, sandbox := range sandboxes {
    		pods = append(pods, sandbox.GetId())
    	}
    	return pods, nil
    }
    
    // RemoveContainers removes running k8s pods
    func (runtime *CRIRuntime) RemoveContainers(containers []string) error {
    	errs := []error{}
    	for _, container := range containers {
    		var lastErr error
    		for i := 0; i < constants.RemoveContainerRetry; i++ {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 06:33:22 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/runtime/runtime_test.go

    			containerRuntime := NewContainerRuntime("")
    			mock := &fakeImpl{}
    			if tc.prepare != nil {
    				tc.prepare(mock)
    			}
    			containerRuntime.SetImpl(mock)
    
    			err := containerRuntime.RemoveContainers(tc.containers)
    
    			assert.Equal(t, tc.shouldError, err != nil)
    		})
    	}
    }
    
    func TestPullImage(t *testing.T) {
    	for _, tc := range []struct {
    		name        string
    		prepare     func(*fakeImpl)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 06:33:22 UTC 2024
    - 11.1K bytes
    - Viewed (0)
Back to top