From 5a75a03a774c17b287ad6166cfc4dd99e16f96e4 Mon Sep 17 00:00:00 2001 From: Tomas Tormo Date: Wed, 17 May 2023 19:25:54 +0200 Subject: [PATCH] Improve warning message Co-authored-by: Steven E. Harris --- pkg/kubelet/kubelet_pods.go | 2 +- pkg/kubelet/kubelet_pods_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index 7482415f334..866d438bd06 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, the image pull may not succeed.", strings.Join(failedPullSecrets, ", ")) + 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, ", ")) } return pullSecrets diff --git a/pkg/kubelet/kubelet_pods_test.go b/pkg/kubelet/kubelet_pods_test.go index 418b141136d..cbb21f564c7 100644 --- a/pkg/kubelet/kubelet_pods_test.go +++ b/pkg/kubelet/kubelet_pods_test.go @@ -5406,7 +5406,7 @@ func TestGetNonExistentImagePullSecret(t *testing.T) { testKubelet.kubelet.secretManager = secret.NewFakeManagerWithSecrets(secrets) defer testKubelet.Cleanup() - expectedEvent := "Warning FailedToRetrieveImagePullSecret Unable to retrieve image pull secrets secretFoo, the image pull may not succeed." + expectedEvent := "Warning FailedToRetrieveImagePullSecret Unable to retrieve image pull secrets secretFoo; attempting to pull the image may not succeed." testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: "nsFoo",