mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user