mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Reword the event message to read better for a single secret
Co-authored-by: Steven E. Harris <seh@panix.com>
This commit is contained in:
		@@ -895,7 +895,7 @@ func (kl *Kubelet) getPullSecretsForPod(pod *v1.Pod) []v1.Secret {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(failedPullSecrets) > 0 {
 | 
						if len(failedPullSecrets) > 0 {
 | 
				
			||||||
		kl.recorder.Eventf(pod, v1.EventTypeWarning, "FailedToRetrieveImagePullSecret", "Unable to retrieve image pull secrets %s; attempting to pull the image may not succeed.", strings.Join(failedPullSecrets, ", "))
 | 
							kl.recorder.Eventf(pod, v1.EventTypeWarning, "FailedToRetrieveImagePullSecret", "Unable to retrieve some image pull secrets (%s); attempting to pull the image may not succeed.", strings.Join(failedPullSecrets, ", "))
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return pullSecrets
 | 
						return pullSecrets
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5406,7 +5406,8 @@ func TestGetNonExistentImagePullSecret(t *testing.T) {
 | 
				
			|||||||
	testKubelet.kubelet.secretManager = secret.NewFakeManagerWithSecrets(secrets)
 | 
						testKubelet.kubelet.secretManager = secret.NewFakeManagerWithSecrets(secrets)
 | 
				
			||||||
	defer testKubelet.Cleanup()
 | 
						defer testKubelet.Cleanup()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	expectedEvent := "Warning FailedToRetrieveImagePullSecret Unable to retrieve image pull secrets secretFoo; attempting to pull the image may not succeed."
 | 
						expectedEvent := "Warning FailedToRetrieveImagePullSecret Unable to retrieve some image pull secrets (secretFoo); attempting to pull the image may not succeed."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	testPod := &v1.Pod{
 | 
						testPod := &v1.Pod{
 | 
				
			||||||
		ObjectMeta: metav1.ObjectMeta{
 | 
							ObjectMeta: metav1.ObjectMeta{
 | 
				
			||||||
			Namespace:   "nsFoo",
 | 
								Namespace:   "nsFoo",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user