k3s/pkg/kubelet/dockershim
Kubernetes Submit Queue b63fab3aaf
Merge pull request #58036 from shlevy/cri-ImageStatus-info
Automatic merge from submit-queue (batch tested with PRs 58171, 58036, 60540). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

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.

**What this PR does / why we need it**:

This PR exposes an image's `Labels` through the CRI. In particular, I want this so I can write an `ImageService` wrapper that delegates all operations to a real `ImageService` but also, when the right `Labels`, ensures any needed [nix store](https://nixos.org/nix/) paths are present on the system when an image is pulled, enabling users to use nix for package distribution while still using containers for isolation and kubernetes for orchestration. In general, though, this should be useful for anything that wants to know about an image's `Labels`

**Special notes for your reviewer**:

I'd prefer to put this change into the `Image` protobuf type instead of putting it into `Info` (gated by `Verbose` or not, available in other requests like `ListImages` or not), but that would be a change to the protocol and it seems `Info` was introduced exactly for this purpose. If it's acceptable to put this into `Image`, I'll rework this.

If this change is acceptable, I will also do the work for `cri-o`, `rktlet`, `frakti`, and `cri-containerd` where applicable.

I have started the process for my employer to sign on to the CLA. I don't have reason to expect it to take long, but because there is more work to do if this change is desired I'd prefer if we can start review before that is completed.

**Release note**:

```release-note
dockershim now makes an Image's Labels available in the Info field of ImageStatusResponse
```
2018-02-28 09:48:23 -08:00
..
cm Add detailed err in ensure docker process error 2018-01-30 15:02:22 +08:00
libdocker Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
metrics update BUILD files 2017-10-15 18:18:13 -07:00
remote Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
testing dockershim: remove corrupt checkpoints immediately upon detection 2017-11-13 20:34:17 -06:00
BUILD Update unit tests and bazel files 2018-02-28 09:56:46 +08:00
convert.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
convert_test.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
doc.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_checkpoint.go dockershim: remove corrupt checkpoints immediately upon detection 2017-11-13 20:34:17 -06:00
docker_checkpoint_test.go dockershim: checkpoint HostNetwork property 2017-06-21 13:10:47 -05:00
docker_container.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_container_test.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_image.go dockershim: Return Labels as Info in ImageStatus. 2018-02-23 07:47:55 -05:00
docker_image_linux.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_image_test.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_image_unsupported.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_image_windows.go Set FsId and usedBytes for windows image file system 2018-02-22 11:09:22 +08:00
docker_legacy_service.go fix all the typos across the project 2018-02-11 11:04:14 +08:00
docker_logs.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_sandbox.go Merge pull request #59301 from dcbw/dockershim-stop-sandbox-no-ip 2018-02-26 17:48:50 -08:00
docker_sandbox_test.go Merge pull request #59301 from dcbw/dockershim-stop-sandbox-no-ip 2018-02-26 17:48:50 -08:00
docker_service.go fix all the typos across the project 2018-02-11 11:04:14 +08:00
docker_service_test.go Fake docker-client assigns random IPs to containers 2018-02-14 14:28:52 +01:00
docker_stats_linux.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_stats_unsupported.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_stats_windows.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
docker_streaming.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
exec.go kubelet: remove the --docker-exec-handler flag 2017-09-22 12:13:31 -07:00
helpers.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
helpers_linux.go Merge pull request #59404 from ohmystack/docker-mem-swap 2018-02-26 21:34:42 -08:00
helpers_linux_test.go Verify seccomp absolute path in dockershim 2017-11-22 02:49:52 +00:00
helpers_test.go fix all the typos across the project 2018-02-11 11:04:14 +08:00
helpers_unsupported.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
helpers_windows.go Setup docker hostconfig for windows containers 2018-02-28 09:56:46 +08:00
naming.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
naming_test.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
security_context.go kubelet: add support for pod PID namespace sharing 2018-02-08 16:58:07 +01:00
security_context_test.go kubelet: add support for pod PID namespace sharing 2018-02-08 16:58:07 +01:00
selinux_util.go Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
selinux_util_test.go dockershim: clean up unused security context code 2017-07-10 17:48:26 -07:00