jiebi/CodeConvo huggingface dataset:
verifyEvents(t, expected, actual) } <ins> // TestEventChannelFull test when channel is full, the events will be discard. func TestEventChannelFull(t *testing.T) { testPleg := newTestGenericPLEGWithChannelSize(4) pleg, runtime := testPleg.pleg, testPleg.runtime ch := pleg.Watch() // The first relist should send a PodSync event to each pod. runtime.AllPodList = []*containertest.FakePod{ {Pod: &kubecontainer.Pod{ ID: "1234", Containers: []*kubecontainer.Container{ createTestContainer("c1", kubecontainer.ContainerStateExited), createTestContainer("c2", kubecontainer.ContainerStateRunning), createTestContainer("c3", kubecontainer.ContainerStateUnknown), }, }}, {Pod: &kubecontainer.Pod{ ID: "4567", Containers: []*kubecontainer.Container{ createTestContainer("c1", kubecontainer.ContainerStateExited), }, }}, } pleg.relist() // Report every running/exited container if we see them for the first time. expected := []*PodLifecycleEvent{ {ID: "1234", Type: ContainerStarted, Data: "c2"}, {ID: "4567", Type: ContainerDied, Data: "c1"}, {ID: "1234", Type: ContainerDied, Data: "c1"}, } actual := getEventsFromChannel(ch) verifyEvents(t, expected, actual) runtime.AllPodList = []*containertest.FakePod{ {Pod: &kubecontainer.Pod{ ID: "1234", Containers: []*kubecontainer.Container{ createTestContainer("c2", kubecontainer.ContainerStateExited), createTestContainer("c3", kubecontainer.ContainerStateRunning), }, }}, {Pod: &kubecontainer.Pod{ ID: "4567", Containers: []*kubecontainer.Container{ createTestContainer("c4", kubecontainer.ContainerStateRunning), }, }}, } pleg.relist() // event channel is full, discard events expected = []*PodLifecycleEvent{ {ID: "1234", Type: ContainerRemoved, Data: "c1"}, {ID: "1234", Type: ContainerDied, Data: "c2"}, {ID: "1234", Type: ContainerStarted, Data: "c3"}, {ID: "4567", Type: ContainerRemoved, Data: "c1"}, } actual = getEventsFromChannel(ch) verifyEvents(t, expected, actual) } </ins> func TestDetectingContainerDeaths(t *testing.T) { // Vary the number of relists after the container started and before the // container died to account for the changes in pleg's internal states.
if stats.Cpu.UsageCoreNanoSeconds != nil { result.CPU.UsageCoreNanoSeconds = &stats.Cpu.UsageCoreNanoSeconds.Value } <ins> usageNanoCores := p.getContainerUsageNanoCores(stats) if usageNanoCores != nil { result.CPU.UsageNanoCores = usageNanoCores } </ins> } if stats.Memory != nil { result.Memory.Time = metav1.NewTime(time.Unix(0, stats.Memory.Timestamp))
return result } <ins> // getContainerUsageNanoCores gets usageNanoCores based on cached usageCoreNanoSeconds. func (p *criStatsProvider) getContainerUsageNanoCores(stats *runtimeapi.ContainerStats) *uint64 { if stats == nil || stats.Cpu == nil || stats.Cpu.UsageCoreNanoSeconds == nil { return nil } p.mutex.Lock() defer func() { // Update cache with new value. p.cpuUsageCache[stats.Attributes.Id] = stats.Cpu p.mutex.Unlock() }() cached, ok := p.cpuUsageCache[stats.Attributes.Id] if !ok || cached.UsageCoreNanoSeconds == nil { return nil } nanoSeconds := stats.Cpu.Timestamp - cached.Timestamp usageNanoCores := (stats.Cpu.UsageCoreNanoSeconds.Value - cached.UsageCoreNanoSeconds.Value) * uint64(time.Second/time.Nanosecond) / uint64(nanoSeconds) return &usageNanoCores } func (p *criStatsProvider) cleanupOutdatedCaches() { p.mutex.Lock() defer p.mutex.Unlock() for k, v := range p.cpuUsageCache { if v == nil { delete(p.cpuUsageCache, k) } if time.Since(time.Unix(0, v.Timestamp)) > defaultCachePeriod { delete(p.cpuUsageCache, k) } } } </ins> // removeTerminatedContainer returns the specified container but with // the stats of the terminated containers removed. func removeTerminatedContainer(containers []*runtimeapi.Container) []*runtimeapi.Container {
m.InodesUsed = resource.NewQuantity(int64(seed+offsetInodeUsage), resource.BinarySI) return m } <ins> func TestGetContainerUsageNanoCores(t *testing.T) { var value0 uint64 var value1 uint64 = 10000000000 tests := []struct { desc          string cpuUsageCache map[string]*runtimeapi.CpuUsage stats         *runtimeapi.ContainerStats expected      *uint64 }{ { desc:          "should return nil if stats is nil", cpuUsageCache: map[string]*runtimeapi.CpuUsage{}, }, { desc:          "should return nil if cpu stats is nil", cpuUsageCache: map[string]*runtimeapi.CpuUsage{}, stats: &runtimeapi.ContainerStats{ Attributes: &runtimeapi.ContainerAttributes{ Id: "1", }, Cpu: nil, }, }, { desc:          "should return nil if usageCoreNanoSeconds is nil", cpuUsageCache: map[string]*runtimeapi.CpuUsage{}, stats: &runtimeapi.ContainerStats{ Attributes: &runtimeapi.ContainerAttributes{ Id: "1", }, Cpu: &runtimeapi.CpuUsage{ Timestamp:            1, UsageCoreNanoSeconds: nil, }, }, }, { desc:          "should return nil if cpu stats is not cached yet", cpuUsageCache: map[string]*runtimeapi.CpuUsage{}, stats: &runtimeapi.ContainerStats{ Attributes: &runtimeapi.ContainerAttributes{ Id: "1", }, Cpu: &runtimeapi.CpuUsage{ Timestamp: 1, UsageCoreNanoSeconds: &runtimeapi.UInt64Value{ Value: 10000000000, }, }, }, }, { desc: "should return zero value if cached cpu stats is equal to current value", stats: &runtimeapi.ContainerStats{ Attributes: &runtimeapi.ContainerAttributes{ Id: "1", }, Cpu: &runtimeapi.CpuUsage{ Timestamp: 1, UsageCoreNanoSeconds: &runtimeapi.UInt64Value{ Value: 10000000000, }, }, }, cpuUsageCache: map[string]*runtimeapi.CpuUsage{ "1": { Timestamp: 0, UsageCoreNanoSeconds: &runtimeapi.UInt64Value{ Value: 10000000000, }, }, }, expected: &value0, }, { desc: "should return correct value if cached cpu stats is not equal to current value", stats: &runtimeapi.ContainerStats{ Attributes: &runtimeapi.ContainerAttributes{ Id: "1", }, Cpu: &runtimeapi.CpuUsage{ Timestamp: int64(time.Second / time.Nanosecond), UsageCoreNanoSeconds: &runtimeapi.UInt64Value{ Value: 20000000000, }, }, }, cpuUsageCache: map[string]*runtimeapi.CpuUsage{ "1": { Timestamp: 0, UsageCoreNanoSeconds: &runtimeapi.UInt64Value{ Value: 10000000000, }, }, }, expected: &value1, }, } for _, test := range tests { provider := &criStatsProvider{cpuUsageCache: test.cpuUsageCache} real := provider.getContainerUsageNanoCores(test.stats) assert.Equal(t, test.expected, real, test.desc) } } </ins>
importpath = "k8s.io/kubernetes/pkg/windows/service", deps = select({ "@io_bazel_rules_go//go/platform:windows": [ <ins> "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", </ins> "//vendor/golang.org/x/sys/windows:go_default_library", "//vendor/golang.org/x/sys/windows/svc:go_default_library", "//vendor/k8s.io/klog:go_default_library",
case svc.Interrogate: s <- c.CurrentStatus case svc.Stop, svc.Shutdown: <del> s <- svc.Status{State: svc.Stopped} // TODO: Stop the kubelet gracefully instead of killing the process os.Exit(0) </del> <ins> klog.Infof("Service stopping") // We need to translate this request into a signal that can be handled by the the signal handler // handling shutdowns normally (currently apiserver/pkg/server/signal.go). // If we do not do this, our main threads won't be notified of the upcoming shutdown. // Since Windows services do not use any console, we cannot simply generate a CTRL_BREAK_EVENT // but need a dedicated notification mechanism. graceful := server.RequestShutdown() // Free up the control handler and let us terminate as gracefully as possible. // If that takes too long, the service controller will kill the remaining threads. // As per https://docs.microsoft.com/en-us/windows/desktop/services/service-control-handler-function s <- svc.Status{State: svc.StopPending} // If we cannot exit gracefully, we really only can exit our process, so atleast the // service manager will think that we gracefully exited. At the time of writing this comment this is // needed for applications that do not use signals (e.g. kube-proxy) if !graceful { go func() { // Ensure the SCM was notified (The operation above (send to s) was received and communicated to the // service control manager - so it doesn't look like the service crashes) time.Sleep(1 * time.Second) os.Exit(0) }() } break Loop </ins> } } }
func SetupSignalHandler() <-chan struct{} { close(onlyOneSignalHandler) // panics when called twice <ins> shutdownHandler = make(chan os.Signal, 2) </ins> stop := make(chan struct{}) <del> c := make(chan os.Signal, 2) signal.Notify(c, shutdownSignals...) </del> <ins> signal.Notify(shutdownHandler, shutdownSignals...) </ins> go func() { <del> <-c </del> <ins> <-shutdownHandler </ins> close(stop) <del> <-c </del> <ins> <-shutdownHandler </ins> os.Exit(1) // second signal. Exit directly. }() return stop } <ins> // RequestShutdown emulates a received event that is considered as shutdown signal (SIGTERM/SIGINT) // This returns whether a handler was notified func RequestShutdown() bool { if shutdownHandler != nil { select { case shutdownHandler <- shutdownSignals[0]: return true default: } } return false } </ins>
// BlockStorageOpts is used to talk to Cinder service type BlockStorageOpts struct { <del> BSVersion       string `gcfg:"bs-version"`        // overrides autodetection. v1 or v2. Defaults to auto TrustDevicePath bool   `gcfg:"trust-device-path"` // See Issue #33128 IgnoreVolumeAZ  bool   `gcfg:"ignore-volume-az"` </del> <ins> BSVersion             string `gcfg:"bs-version"`        // overrides autodetection. v1 or v2. Defaults to auto TrustDevicePath       bool   `gcfg:"trust-device-path"` // See Issue #33128 IgnoreVolumeAZ        bool   `gcfg:"ignore-volume-az"` NodeVolumeAttachLimit int    `gcfg:"node-volume-attach-limit"` // override volume attach limit for Cinder. Default is : 256 </ins> } // RouterOpts is used for Neutron routes
return &os, nil } <ins> // NewFakeOpenStackCloud creates and returns an instance of Openstack cloudprovider. // Mainly for use in tests that require instantiating Openstack without having // to go through cloudprovider interface. func NewFakeOpenStackCloud(cfg Config) (*OpenStack, error) { provider, err := openstack.NewClient(cfg.Global.AuthURL) if err != nil { return nil, err } emptyDuration := MyDuration{} if cfg.Metadata.RequestTimeout == emptyDuration { cfg.Metadata.RequestTimeout.Duration = time.Duration(defaultTimeOut) } provider.HTTPClient.Timeout = cfg.Metadata.RequestTimeout.Duration os := OpenStack{ provider:     provider, region:       cfg.Global.Region, lbOpts:       cfg.LoadBalancer, bsOpts:       cfg.BlockStorage, routeOpts:    cfg.Route, metadataOpts: cfg.Metadata, } return &os, nil } </ins> // Initialize passes a Kubernetes clientBuilder interface to the cloud provider func (os *OpenStack) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{}) { }
return os.bsOpts.TrustDevicePath } <ins> // NodeVolumeAttachLimit specifies number of cinder volumes that can be attached to this node. func (os *OpenStack) NodeVolumeAttachLimit() int { return os.bsOpts.NodeVolumeAttachLimit } </ins> // GetLabelsForVolume implements PVLabeler.GetLabelsForVolume func (os *OpenStack) GetLabelsForVolume(ctx context.Context, pv *v1.PersistentVolume) (map[string]string, error) { // Ignore if not Cinder.
], embed = [":go_default_library"], deps = [ <ins> "//pkg/cloudprovider/providers/openstack:go_default_library", </ins> "//pkg/util/mount:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", <ins> "//pkg/volume/util:go_default_library", </ins> "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
if cloud.ProviderName() != openstack.ProviderName { return nil, fmt.Errorf("Expected Openstack cloud, found %s", cloud.ProviderName()) } <ins> openstackCloud, ok := cloud.(*openstack.OpenStack) if ok && openstackCloud.NodeVolumeAttachLimit() > 0 { volumeLimits[util.CinderVolumeLimitKey] = int64(openstackCloud.NodeVolumeAttachLimit()) } </ins> return volumeLimits, nil }
"k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utiltesting "k8s.io/client-go/util/testing" <ins> "k8s.io/kubernetes/pkg/cloudprovider/providers/openstack" </ins> "k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" <ins> "k8s.io/kubernetes/pkg/volume/util" </ins> ) func TestCanSupport(t *testing.T) {
t.Errorf("Deleter() failed: %v", err) } } <ins> func TestGetVolumeLimit(t *testing.T) { tmpDir, err := utiltesting.MkTmpdir("cinderTest") if err != nil { t.Fatalf("can't make a temp dir: %v", err) } cloud, err := getOpenstackCloudProvider() if err != nil { t.Fatalf("can not instantiate openstack cloudprovider : %v", err) } defer os.RemoveAll(tmpDir) plugMgr := volume.VolumePluginMgr{} volumeHost := volumetest.NewFakeVolumeHostWithCloudProvider(tmpDir, nil, nil, cloud) plugMgr.InitPlugins(ProbeVolumePlugins(), nil /* prober */, volumeHost) plug, err := plugMgr.FindPluginByName("kubernetes.io/cinder") if err != nil { t.Fatalf("Can't find the plugin by name") } attachablePlugin, ok := plug.(volume.VolumePluginWithAttachLimits) if !ok { t.Fatalf("plugin %s is not of attachable type", plug.GetPluginName()) } limits, err := attachablePlugin.GetVolumeLimits() if err != nil { t.Errorf("error fetching limits : %v", err) } if len(limits) == 0 { t.Fatalf("expecting limit from openstack got none") } limit, _ := limits[util.CinderVolumeLimitKey] if limit != 10 { t.Fatalf("expected volume limit to be 10 got %d", limit) } } func getOpenstackCloudProvider() (*openstack.OpenStack, error) { cfg := getOpenstackConfig() return openstack.NewFakeOpenStackCloud(cfg) } func getOpenstackConfig() openstack.Config { cfg := openstack.Config{ Global: struct { AuthURL    string `gcfg:"auth-url"` Username   string UserID     string `gcfg:"user-id"` Password   string TenantID   string `gcfg:"tenant-id"` TenantName string `gcfg:"tenant-name"` TrustID    string `gcfg:"trust-id"` DomainID   string `gcfg:"domain-id"` DomainName string `gcfg:"domain-name"` Region     string CAFile     string `gcfg:"ca-file"` }{ Username:   "user", Password:   "pass", TenantID:   "foobar", DomainID:   "2a73b8f597c04551a0fdc8e95544be8a", DomainName: "local", AuthURL:    "http://auth.url", UserID:     "user", }, BlockStorage: openstack.BlockStorageOpts{ NodeVolumeAttachLimit: 10, }, } return cfg } </ins>
if err != nil { return nil, fmt.Errorf("Failed to create tls config: %v", err) } <del> if tlsConfig != nil { </del> <ins> if url.Scheme == "https" { </ins> url.Scheme = "wss" <del> if !strings.Contains(url.Host, ":") { url.Host += ":443" } </del> } else { url.Scheme = "ws" <del> if !strings.Contains(url.Host, ":") { url.Host += ":80" } </del> } headers, err := headersForConfig(config, url) if err != nil {
p.podBackoff.ClearPodBackoff(nsNameForPod(pod)) } <del> // isPodBackingOff returns whether a pod is currently undergoing backoff in the podBackoff structure </del> <ins> // isPodBackingOff returns true if a pod is still waiting for its backoff timer. // If this returns true, the pod should not be re-tried. </ins> func (p *PriorityQueue) isPodBackingOff(pod *v1.Pod) bool { boTime, exists := p.podBackoff.GetBackoffTime(nsNameForPod(pod)) if !exists {
return p.schedulingCycle } <del> // AddUnschedulableIfNotPresent does nothing if the pod is present in any // queue. If pod is unschedulable, it adds pod to unschedulable queue if // p.moveRequestCycle > podSchedulingCycle or to backoff queue if p.moveRequestCycle // <= podSchedulingCycle but pod is subject to backoff. In other cases, it adds pod to // active queue. </del> <ins> // AddUnschedulableIfNotPresent inserts a pod that cannot be scheduled into // the queue, unless it is already in the queue. Normally, PriorityQueue puts // unschedulable pods in `unschedulableQ`. But if there has been a recent move // request, then the pod is put in `podBackoffQ`. </ins> func (p *PriorityQueue) AddUnschedulableIfNotPresent(pod *v1.Pod, podSchedulingCycle int64) error { p.lock.Lock() defer p.lock.Unlock()
if _, exists, _ := p.podBackoffQ.Get(pInfo); exists { return fmt.Errorf("pod is already present in the backoffQ") } <del> if podSchedulingCycle > p.moveRequestCycle && isPodUnschedulable(pod) { p.backoffPod(pod) p.unschedulableQ.addOrUpdate(pInfo) p.nominatedPods.add(pod, "") return nil } // If a move request has been received and the pod is subject to backoff, move it to the BackoffQ. if p.isPodBackingOff(pod) && isPodUnschedulable(pod) { err := p.podBackoffQ.Add(pInfo) if err != nil { klog.Errorf("Error adding pod %v to the backoff queue: %v", pod.Name, err) } else { p.nominatedPods.add(pod, "") </del> <ins> // Every unschedulable pod is subject to backoff timers. p.backoffPod(pod) // If a move request has been received, move it to the BackoffQ, otherwise move // it to unschedulableQ. if p.moveRequestCycle >= podSchedulingCycle { if err := p.podBackoffQ.Add(pInfo); err != nil { // TODO: Delete this klog call and log returned errors at the call site. err = fmt.Errorf("error adding pod %v to the backoff queue: %v", pod.Name, err) klog.Error(err) return err </ins> } <del> return err </del> <ins> } else { p.unschedulableQ.addOrUpdate(pInfo) </ins> } <del> err := p.activeQ.Add(pInfo) if err == nil { p.nominatedPods.add(pod, "") p.cond.Broadcast() } return err </del> <ins> p.nominatedPods.add(pod, "") return nil </ins> } // flushBackoffQCompleted Moves all pods from backoffQ which have completed backoff in to activeQ
q := NewPriorityQueue(nil) q.Add(&highPriNominatedPod) q.AddUnschedulableIfNotPresent(&highPriNominatedPod, q.SchedulingCycle()) // Must not add anything. <del> q.AddUnschedulableIfNotPresent(&medPriorityPod, q.SchedulingCycle())      // This should go to activeQ. </del> q.AddUnschedulableIfNotPresent(&unschedulablePod, q.SchedulingCycle()) expectedNominatedPods := &nominatedPodMap{ nominatedPodToNode: map[types.UID]string{ <del> medPriorityPod.UID:      "node1", </del> unschedulablePod.UID:    "node1", highPriNominatedPod.UID: "node1", }, nominatedPods: map[string][]*v1.Pod{ <del> "node1": {&highPriNominatedPod, &medPriorityPod, &unschedulablePod}, </del> <ins> "node1": {&highPriNominatedPod, &unschedulablePod}, </ins> }, } if !reflect.DeepEqual(q.nominatedPods, expectedNominatedPods) {
if p, err := q.Pop(); err != nil || p != &highPriNominatedPod { t.Errorf("Expected: %v after Pop, but got: %v", highPriNominatedPod.Name, p.Name) } <del> if p, err := q.Pop(); err != nil || p != &medPriorityPod { t.Errorf("Expected: %v after Pop, but got: %v", medPriorityPod.Name, p.Name) } </del> if len(q.nominatedPods.nominatedPods) != 1 { t.Errorf("Expected nomindatePods to have one element: %v", q.nominatedPods) }
} } <del> // TestPriorityQueue_AddUnschedulableIfNotPresent_Async tests scenario when </del> <ins> // TestPriorityQueue_AddUnschedulableIfNotPresent_Backoff tests scenario when </ins> // AddUnschedulableIfNotPresent is called asynchronously pods in and before // current scheduling cycle will be put back to activeQueue if we were trying // to schedule them when we received move request. <del> func TestPriorityQueue_AddUnschedulableIfNotPresent_Async(t *testing.T) { </del> <ins> func TestPriorityQueue_AddUnschedulableIfNotPresent_Backoff(t *testing.T) { </ins> q := NewPriorityQueue(nil) totalNum := 10 expectedPods := make([]v1.Pod, 0, totalNum)
// move all pods to active queue when we were trying to schedule them q.MoveAllToActiveQueue() <del> moveReqChan := make(chan struct{}) var wg sync.WaitGroup wg.Add(totalNum - 1) // mark pods[1] ~ pods[totalNum-1] as unschedulable, fire goroutines to add them back later </del> <ins> oldCycle := q.SchedulingCycle() firstPod, _ := q.Pop() if !reflect.DeepEqual(&expectedPods[0], firstPod) { t.Errorf("Unexpected pod. Expected: %v, got: %v", &expectedPods[0], firstPod) } // mark pods[1] ~ pods[totalNum-1] as unschedulable and add them back </ins> for i := 1; i < totalNum; i++ { unschedulablePod := expectedPods[i].DeepCopy() unschedulablePod.Status = v1.PodStatus{
}, }, } <del> cycle := q.SchedulingCycle() go func() { <-moveReqChan q.AddUnschedulableIfNotPresent(unschedulablePod, cycle) wg.Done() }() } firstPod, _ := q.Pop() if !reflect.DeepEqual(&expectedPods[0], firstPod) { t.Errorf("Unexpected pod. Expected: %v, got: %v", &expectedPods[0], firstPod) </del> <ins> q.AddUnschedulableIfNotPresent(unschedulablePod, oldCycle) </ins> } <del> // close moveReqChan here to make sure q.AddUnschedulableIfNotPresent is called after another pod is popped close(moveReqChan) wg.Wait() // all other pods should be in active queue again </del> <ins> // Since there was a move request at the same cycle as "oldCycle", these pods // should be in the backoff queue. </ins> for i := 1; i < totalNum; i++ { <del> if _, exists, _ := q.activeQ.Get(newPodInfoNoTimestamp(&expectedPods[i])); !exists { t.Errorf("Expected %v to be added to activeQ.", expectedPods[i].Name) </del> <ins> if _, exists, _ := q.podBackoffQ.Get(newPodInfoNoTimestamp(&expectedPods[i])); !exists { t.Errorf("Expected %v to be added to podBackoffQ.", expectedPods[i].Name) </ins> } } }
imageutils.GetE2EImage(imageutils.Nonewprivs), imageutils.GetPauseImageName(), framework.GetGPUDevicePluginImage(), <del> "gcr.io/kubernetes-e2e-test-images/node-perf/npb-is-amd64:1.0", "gcr.io/kubernetes-e2e-test-images/node-perf/npb-ep-amd64:1.0", </del> <ins> "gcr.io/kubernetes-e2e-test-images/node-perf/npb-is:1.0", "gcr.io/kubernetes-e2e-test-images/node-perf/npb-ep:1.0", </ins> "gcr.io/kubernetes-e2e-test-images/node-perf/tf-wide-deep-amd64:1.0", )
var containers []corev1.Container ctn := corev1.Container{ Name:  fmt.Sprintf("%s-ctn", w.Name()), <del> Image: "gcr.io/kubernetes-e2e-test-images/node-perf/npb-ep-amd64:1.0", </del> <ins> Image: "gcr.io/kubernetes-e2e-test-images/node-perf/npb-ep:1.0", </ins> Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceName(corev1.ResourceCPU):    resource.MustParse("15000m"),
var containers []corev1.Container ctn := corev1.Container{ Name:  fmt.Sprintf("%s-ctn", w.Name()), <del> Image: "gcr.io/kubernetes-e2e-test-images/node-perf/npb-is-amd64:1.0", </del> <ins> Image: "gcr.io/kubernetes-e2e-test-images/node-perf/npb-is:1.0", </ins> Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceName(corev1.ResourceCPU):    resource.MustParse("16000m"),
"density.go", "framework.go", "hybrid_network.go", <ins> "memory_limits.go", </ins> "networking.go", "volumes.go", ], importpath = "k8s.io/kubernetes/test/e2e/windows", visibility = ["//visibility:public"], deps = [ <ins> "//pkg/kubelet/apis/config:go_default_library", </ins> "//staging/src/k8s.io/api/core/v1:go_default_library", <ins> "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", </ins> "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", <ins> "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", </ins> "//staging/src/k8s.io/client-go/tools/cache:go_default_library", <ins> "//staging/src/k8s.io/kubelet/config/v1beta1:go_default_library", </ins> "//test/e2e/framework:go_default_library", "//test/utils/image:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library",
"sync" "time" <del> "k8s.io/api/core/v1" </del> <ins> v1 "k8s.io/api/core/v1" </ins> metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime"
) // create test pod data structure <del> pods := newTestPods(testArg.podsNr, false, imageutils.GetPauseImageName(), podType) </del> <ins> pods := newDensityTestPods(testArg.podsNr, false, imageutils.GetPauseImageName(), podType) </ins> // the controller watches the change of pod status controller := newInformerWatchPod(f, mutex, watchTimes, podType)