k3s/pkg/kubelet
Kubernetes Submit Queue da601bc72a
Merge pull request #58955 from runcom/fix-cri-image-spec
Automatic merge from submit-queue (batch tested with PRs 58955, 58968, 58971, 58963, 58298). 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>.

pkg: kubelet: do not assume anything about images names

This patch fixes a regression introduced by
https://github.com/kubernetes/kubernetes/pull/51751 in the CRI
interface.
That commit actually changed a unit test where we were previously *not*
assuming anything about an image name.
Before that commit, if you send the image "busybox" through the CRI,
the container runtime receives "busybox". After that patch the
container runtime gets "docker.io/library/busybox".
While that may be correct for the internal kube dockershim, in the CRI
we must not assume anything about image names. The ImageSpec is not
providing any spec around the image so the container runtime should
just get the raw image name from the pod spec. Every container runtime
can handle image names the way it wants. The "docker.io" namespace is
not at all "standard", CRI-O is not following what the docker UI say
since that's the docker UI. We should not focus the CRI on wrong UI
design, especially around a default namespace.
Image name normalization is a Docker implementation detail around short images names, not the CRI. 

ImageSpec is not standardized yet:
https://github.com/kubernetes/kubernetes/issues/46255 and
https://github.com/kubernetes/kubernetes/issues/7203

This is something which should land in 1.9 as well since the regression
is from 1.8.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>



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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix regression in the CRI: do not add a default hostname on short image names
```
2018-01-29 13:48:39 -08:00
..
apis Merge pull request #57973 from dims/set-pids-limit-at-pod-level 2018-01-25 18:29:31 -08:00
cadvisor testcase to pkg/kubelet/cadvisor/util.go 2018-01-19 14:30:45 +08:00
certificate Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
checkpoint Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
client Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
cm Merge pull request #57973 from dims/set-pids-limit-at-pod-level 2018-01-25 18:29:31 -08:00
config Merge pull request #54913 from chentao1596/kubelet-get-pods-from-path-unused-param 2018-01-24 20:13:13 -08:00
configmap Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
container Add a container type to the runtime labels 2018-01-23 13:16:36 +01:00
custommetrics Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
dockershim dockershim: clean up the legacy interface 2018-01-19 17:09:40 -08:00
envvars Update generated files 2017-11-09 12:14:08 +01:00
events Fixed kubelet error message to be more descriptive. Added Attach success event for help in debugging. 2017-12-15 15:36:59 -08:00
eviction fixing array out of bound by checking initContainers instead of containers 2018-01-25 09:58:51 +01:00
gpu Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
images pkg: kubelet: do not assume anything about images names 2018-01-29 19:58:13 +01:00
kubeletconfig Kubelet flags take precedence 2018-01-29 10:07:37 -08:00
kuberuntime Add a container type to the runtime labels 2018-01-23 13:16:36 +01:00
leaky
lifecycle Fix scheduler refs in BUILD files. 2018-01-05 15:05:01 -08:00
metrics Adds device plugin registration count metric and allocation latency metric. 2017-11-21 13:44:10 -08:00
mountpod Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
network remove unnecessary function getBuggyHostportChain 2018-01-09 10:38:53 +08:00
pleg Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
pod Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
preemption Fix scheduler refs in BUILD files. 2018-01-05 15:05:01 -08:00
prober Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
qos Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
remote Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
rkt Merge pull request #56960 from islinwb/remove_unused_code_ut_pkg 2018-01-18 02:41:29 -08:00
secret Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
server enable on-demand metrics for eviction 2018-01-08 10:20:02 -08:00
stats Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
status Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
sysctl Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
types Add a container type to the runtime labels 2018-01-23 13:16:36 +01:00
util Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
volumemanager remove duplicated import 2018-01-17 09:34:59 +08:00
winstats Get windows kernel version directly from registry 2018-01-19 11:09:45 +08:00
BUILD kubelet: remove the rktshim directory 2018-01-26 18:03:34 -08:00
OWNERS
active_deadline.go
active_deadline_test.go
doc.go
kubelet.go Merge pull request #58418 from yujuhong/deprecate-rktnetes 2018-01-24 08:54:49 -08:00
kubelet_getters.go Remove hacks added for mesos 2017-12-03 13:52:30 -05:00
kubelet_getters_test.go
kubelet_network.go Remove hacks added for mesos 2017-12-03 13:52:30 -05:00
kubelet_network_test.go Move DNS related kubelet codes into its own package 2017-11-15 10:56:44 -08:00
kubelet_node_status.go Merge pull request #57266 from vikaschoudhary16/unhealthy_device 2018-01-12 19:55:54 -08:00
kubelet_node_status_test.go Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
kubelet_pods.go remove useless function hasHostPortConflicts 2017-12-18 16:14:26 +08:00
kubelet_pods_test.go remove useless function hasHostPortConflicts 2017-12-18 16:14:26 +08:00
kubelet_pods_windows_test.go
kubelet_resources.go
kubelet_resources_test.go
kubelet_test.go Merge pull request #58229 from sjenning/exempt-sandbox-image 2018-01-18 16:36:36 -08:00
kubelet_volumes.go
kubelet_volumes_test.go BlockVolumesSupport: CRI, VolumeManager and OperationExecutor changes 2017-11-20 14:10:26 -05:00
oom_watcher.go
oom_watcher_test.go
pod_container_deletor.go
pod_container_deletor_test.go
pod_workers.go
pod_workers_test.go
reason_cache.go
reason_cache_test.go
runonce.go
runonce_test.go
runtime.go
util.go
volume_host.go enable flexvolume on Windows 2017-12-07 06:24:20 +00:00