mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
dockershim: Return Labels as Info in ImageStatus.
c6ddc749e8
added an Info field to
ImageStatusResponse when Verbose is true. This makes the image's
Labels available in that field, rather than unconditionally returning
an empty map.
This commit is contained in:
parent
eff9f75f70
commit
48af739893
@ -76,7 +76,11 @@ func (ds *dockerService) ImageStatus(_ context.Context, r *runtimeapi.ImageStatu
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &runtimeapi.ImageStatusResponse{Image: imageStatus}, nil
|
||||
res := runtimeapi.ImageStatusResponse{Image: imageStatus}
|
||||
if r.GetVerbose() {
|
||||
res.Info = imageInspect.Config.Labels
|
||||
}
|
||||
return &res, nil
|
||||
}
|
||||
|
||||
// PullImage pulls an image with authentication config.
|
||||
|
Loading…
Reference in New Issue
Block a user