mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Use VirtualSize of the docker image as the image size
This commit is contained in:
@@ -55,6 +55,6 @@ func toRuntimeImage(image *docker.APIImages) (*kubecontainer.Image, error) {
|
||||
return &kubecontainer.Image{
|
||||
ID: image.ID,
|
||||
Tags: image.RepoTags,
|
||||
Size: image.Size,
|
||||
Size: image.VirtualSize,
|
||||
}, nil
|
||||
}
|
||||
|
@@ -51,9 +51,9 @@ func TestToRuntimeContainer(t *testing.T) {
|
||||
|
||||
func TestToRuntimeImage(t *testing.T) {
|
||||
original := &docker.APIImages{
|
||||
ID: "aeeea",
|
||||
RepoTags: []string{"abc", "def"},
|
||||
Size: 1234,
|
||||
ID: "aeeea",
|
||||
RepoTags: []string{"abc", "def"},
|
||||
VirtualSize: 1234,
|
||||
}
|
||||
expected := &kubecontainer.Image{
|
||||
ID: "aeeea",
|
||||
|
@@ -1173,7 +1173,7 @@ func (kl *Kubelet) SyncPods(allPods []*api.Pod, podSyncTypes map[types.UID]metri
|
||||
}
|
||||
|
||||
// Note that we just killed the unwanted pods. This may not have reflected
|
||||
// in the cache. We need to bypass the cach to get the latest set of
|
||||
// in the cache. We need to bypass the cache to get the latest set of
|
||||
// running pods to clean up the volumes.
|
||||
// TODO: Evaluate the performance impact of bypassing the runtime cache.
|
||||
runningPods, err = kl.containerRuntime.GetPods(false)
|
||||
|
Reference in New Issue
Block a user