"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/kubelet/kubelet_pods.go" between
kubernetes-1.18.14.tar.gz and kubernetes-1.18.15.tar.gz

About: Kubernetes is a platform for automating deployment, scaling, and operations of application containers across clusters of hosts (written in "Go"). 1.18.x series.

kubelet_pods.go  (kubernetes-1.18.14):kubelet_pods.go  (kubernetes-1.18.15)
skipping to change at line 147 skipping to change at line 147
// - when the Pod sandbox is being created, its IP is still unknown. Henc e, PodIP will not have been set. // - when the Pod sandbox is being created, its IP is still unknown. Henc e, PodIP will not have been set.
mountEtcHostsFile := len(podIPs) > 0 && runtime.GOOS != "windows" mountEtcHostsFile := len(podIPs) > 0 && runtime.GOOS != "windows"
klog.V(3).Infof("container: %v/%v/%v podIPs: %q creating hosts mount: %v" , pod.Namespace, pod.Name, container.Name, podIPs, mountEtcHostsFile) klog.V(3).Infof("container: %v/%v/%v podIPs: %q creating hosts mount: %v" , pod.Namespace, pod.Name, container.Name, podIPs, mountEtcHostsFile)
mounts := []kubecontainer.Mount{} mounts := []kubecontainer.Mount{}
var cleanupAction func() var cleanupAction func()
for i, mount := range container.VolumeMounts { for i, mount := range container.VolumeMounts {
// do not mount /etc/hosts if container is already mounting on th e path // do not mount /etc/hosts if container is already mounting on th e path
mountEtcHostsFile = mountEtcHostsFile && (mount.MountPath != etcH ostsPath) mountEtcHostsFile = mountEtcHostsFile && (mount.MountPath != etcH ostsPath)
vol, ok := podVolumes[mount.Name] vol, ok := podVolumes[mount.Name]
if !ok || vol.Mounter == nil { if !ok || vol.Mounter == nil {
klog.Errorf("Mount cannot be satisfied for container %q, because the volume is missing or the volume mounter is nil: %+v", container.Name , mount) klog.Errorf("Mount cannot be satisfied for container %q, because the volume is missing (ok=%v) or the volume mounter (vol.Mounter) is nil (vol=%+v): %+v", container.Name, ok, vol, mount)
return nil, cleanupAction, fmt.Errorf("cannot find volume %q to mount into container %q", mount.Name, container.Name) return nil, cleanupAction, fmt.Errorf("cannot find volume %q to mount into container %q", mount.Name, container.Name)
} }
relabelVolume := false relabelVolume := false
// If the volume supports SELinux and it has not been // If the volume supports SELinux and it has not been
// relabeled already and it is not a read-only volume, // relabeled already and it is not a read-only volume,
// relabel it and mark it as labeled // relabel it and mark it as labeled
if vol.Mounter.GetAttributes().Managed && vol.Mounter.GetAttribut es().SupportsSELinux && !vol.SELinuxLabeled { if vol.Mounter.GetAttributes().Managed && vol.Mounter.GetAttribut es().SupportsSELinux && !vol.SELinuxLabeled {
vol.SELinuxLabeled = true vol.SELinuxLabeled = true
relabelVolume = true relabelVolume = true
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)