mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Improve warning message
Co-authored-by: Steven E. Harris <seh@panix.com>
This commit is contained in:
parent
123845da88
commit
5a75a03a77
@ -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, 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
|
return pullSecrets
|
||||||
|
@ -5406,7 +5406,7 @@ 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, 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{
|
testPod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Namespace: "nsFoo",
|
Namespace: "nsFoo",
|
||||||
|
Loading…
Reference in New Issue
Block a user