diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index 866d438bd06..f2f99efce52 100644 --- a/pkg/kubelet/kubelet_pods.go +++ b/pkg/kubelet/kubelet_pods.go @@ -895,7 +895,7 @@ func (kl *Kubelet) getPullSecretsForPod(pod *v1.Pod) []v1.Secret { } 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 diff --git a/pkg/kubelet/kubelet_pods_test.go b/pkg/kubelet/kubelet_pods_test.go index cbb21f564c7..ca1ee492feb 100644 --- a/pkg/kubelet/kubelet_pods_test.go +++ b/pkg/kubelet/kubelet_pods_test.go @@ -5406,7 +5406,8 @@ func TestGetNonExistentImagePullSecret(t *testing.T) { testKubelet.kubelet.secretManager = secret.NewFakeManagerWithSecrets(secrets) 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{ ObjectMeta: metav1.ObjectMeta{ Namespace: "nsFoo",