mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #28705 from pmorie/rm-getref
Automatic merge from submit-queue Remove unnecessary calls to api.GetReference These calls are unnecessary, can be removed. `Eventf` and others just call `GetReference` on the object they are passed. cc @kubernetes/sig-node
This commit is contained in:
		@@ -1915,11 +1915,7 @@ func (dm *DockerManager) SyncPod(pod *api.Pod, _ api.PodStatus, podStatus *kubec
 | 
				
			|||||||
	glog.V(3).Infof("Got container changes for pod %q: %+v", format.Pod(pod), containerChanges)
 | 
						glog.V(3).Infof("Got container changes for pod %q: %+v", format.Pod(pod), containerChanges)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if containerChanges.InfraChanged {
 | 
						if containerChanges.InfraChanged {
 | 
				
			||||||
		ref, err := api.GetReference(pod)
 | 
							dm.recorder.Eventf(pod, api.EventTypeNormal, "InfraChanged", "Pod infrastructure changed, it will be killed and re-created.")
 | 
				
			||||||
		if err != nil {
 | 
					 | 
				
			||||||
			glog.Errorf("Couldn't make a ref to pod %q: '%v'", format.Pod(pod), err)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		dm.recorder.Eventf(ref, api.EventTypeNormal, "InfraChanged", "Pod infrastructure changed, it will be killed and re-created.")
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if containerChanges.StartInfraContainer || (len(containerChanges.ContainersToKeep) == 0 && len(containerChanges.ContainersToStart) == 0) {
 | 
						if containerChanges.StartInfraContainer || (len(containerChanges.ContainersToKeep) == 0 && len(containerChanges.ContainersToStart) == 0) {
 | 
				
			||||||
		if len(containerChanges.ContainersToKeep) == 0 && len(containerChanges.ContainersToStart) == 0 {
 | 
							if len(containerChanges.ContainersToKeep) == 0 && len(containerChanges.ContainersToStart) == 0 {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1798,13 +1798,10 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
 | 
				
			|||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if err := kl.volumeManager.WaitForAttachAndMount(defaultedPod); err != nil {
 | 
						if err := kl.volumeManager.WaitForAttachAndMount(defaultedPod); err != nil {
 | 
				
			||||||
		ref, errGetRef := api.GetReference(pod)
 | 
							kl.recorder.Eventf(pod, api.EventTypeWarning, kubecontainer.FailedMountVolume, "Unable to mount volumes for pod %q: %v", format.Pod(pod), err)
 | 
				
			||||||
		if errGetRef == nil && ref != nil {
 | 
					 | 
				
			||||||
			kl.recorder.Eventf(ref, api.EventTypeWarning, kubecontainer.FailedMountVolume, "Unable to mount volumes for pod %q: %v", format.Pod(pod), err)
 | 
					 | 
				
			||||||
		glog.Errorf("Unable to mount volumes for pod %q: %v; skipping pod", format.Pod(pod), err)
 | 
							glog.Errorf("Unable to mount volumes for pod %q: %v; skipping pod", format.Pod(pod), err)
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Fetch the pull secrets for the pod
 | 
						// Fetch the pull secrets for the pod
 | 
				
			||||||
	pullSecrets, err := kl.getPullSecretsForPod(pod)
 | 
						pullSecrets, err := kl.getPullSecretsForPod(pod)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user