Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for sandboxes (0.14 sec)

  1. pkg/kubelet/kuberuntime/kuberuntime_gc.go

    			cgc.removeSandbox(ctx, sandboxes[i].id)
    		}
    	}
    }
    
    // removeSandbox removes the sandbox by sandboxID.
    func (cgc *containerGC) removeSandbox(ctx context.Context, sandboxID string) {
    	klog.V(4).InfoS("Removing sandbox", "sandboxID", sandboxID)
    	// In normal cases, kubelet should've already called StopPodSandbox before
    	// GC kicks in. To guard against the rare cases where this is not true, try
    	// stopping the sandbox before removing it.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  2. pkg/kubelet/kuberuntime/kuberuntime_sandbox.go

    			State: *state,
    		}
    	}
    	sandboxes, err := m.runtimeService.ListPodSandbox(ctx, filter)
    	if err != nil {
    		klog.ErrorS(err, "Failed to list sandboxes for pod", "podUID", podUID)
    		return nil, err
    	}
    
    	if len(sandboxes) == 0 {
    		return nil, nil
    	}
    
    	// Sort with newest first.
    	sandboxIDs := make([]string, len(sandboxes))
    	sort.Sort(podSandboxByCreated(sandboxes))
    	for i, s := range sandboxes {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  3. pkg/kubelet/pleg/generic.go

    			containerStateCount[string(container.State)]++
    		}
    
    		sandboxes := pod.Sandboxes
    
    		for _, sandbox := range sandboxes {
    			if sandbox.State == kubecontainer.ContainerStateRunning {
    				runningSandboxNum++
    				// every pod should only have one running sandbox
    				break
    			}
    		}
    	}
    	for key, value := range containerStateCount {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  4. pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go

    	assert.NoError(t, err)
    	assert.Contains(t, fakeRuntime.Called, "RunPodSandbox")
    	sandboxes, err := fakeRuntime.ListPodSandbox(ctx, &runtimeapi.PodSandboxFilter{Id: id})
    	assert.NoError(t, err)
    	assert.Equal(t, len(sandboxes), 1)
    	assert.Equal(t, sandboxes[0].Id, fmt.Sprintf("%s_%s_%s_1", pod.Name, pod.Namespace, pod.UID))
    	assert.Equal(t, sandboxes[0].State, runtimeapi.PodSandboxState_SANDBOX_READY)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  5. pkg/kubelet/container/helpers.go

    		}
    		runningPod.Containers = append(runningPod.Containers, container)
    	}
    
    	// Populate sandboxes in kubecontainer.Pod
    	for _, sandbox := range podStatus.SandboxStatuses {
    		runningPod.Sandboxes = append(runningPod.Sandboxes, &Container{
    			ID:    ContainerID{Type: runtimeName, ID: sandbox.Id},
    			State: SandboxToContainerState(sandbox.State),
    		})
    	}
    	return runningPod
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  6. pkg/kubelet/container/runtime.go

    	Containers []*Container
    	// List of sandboxes associated with this pod. The sandboxes are converted
    	// to Container temporarily to avoid substantial changes to other
    	// components. This is only populated by kuberuntime.
    	// TODO: use the runtimeApi.PodSandbox type directly.
    	Sandboxes []*Container
    }
    
    // PodPair contains both runtime#Pod and api#Pod
    type PodPair struct {
    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/kuberuntime/helpers.go

    		State:               toKubeContainerState(c.State),
    	}, nil
    }
    
    // sandboxToKubeContainer converts runtimeapi.PodSandbox to kubecontainer.Container.
    // This is only needed because we need to return sandboxes as if they were
    // kubecontainer.Containers to avoid substantial changes to PLEG.
    // TODO: Remove this once it becomes obsolete.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 02:01:31 UTC 2024
    - 12K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/util/runtime/runtime_test.go

    			containers:  []string{"1", "2"},
    			shouldError: false,
    		},
    		{
    			name:       "invalid: remove pod sandbox fails",
    			containers: []string{"1"},
    			prepare: func(mock *fakeImpl) {
    				mock.RemovePodSandboxReturns(errTest)
    			},
    			shouldError: true,
    		},
    		{
    			name:       "invalid: stop pod sandbox fails",
    			containers: []string{"1"},
    			prepare: func(mock *fakeImpl) {
    				mock.StopPodSandboxReturns(errTest)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 06:33:22 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  9. testing/internal-performance-testing/src/main/groovy/org/gradle/performance/fixture/CrossVersionPerformanceTestRunner.groovy

            return cleanOrCreate(perVersion)
        }
    
        private File perVersionStudioSandboxDirectory(File workingDir) {
            File studioSandboxDir = new File(workingDir, "studio-sandbox")
            return cleanOrCreate(studioSandboxDir)
        }
    
        private static File cleanOrCreate(File directory) {
            if (!directory.exists()) {
                directory.mkdirs()
            } else {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 25 14:54:56 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  10. pkg/kubelet/kuberuntime/kuberuntime_container_test.go

    		Spec: v1.PodSpec{
    			Containers: []v1.Container{
    				{
    					Name:            "foo",
    					Image:           "busybox",
    					ImagePullPolicy: v1.PullIfNotPresent,
    				},
    			},
    		},
    	}
    
    	// Create fake sandbox and container
    	_, fakeContainers := makeAndSetFakePod(t, m, fakeRuntime, pod)
    	assert.Equal(t, len(fakeContainers), 1)
    
    	containerID := fakeContainers[0].Id
    	fakeOS := m.osInterface.(*containertest.FakeOS)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 28K bytes
    - Viewed (0)
Back to top