mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 13:31:52 +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:
parent
5a75a03a77
commit
a10ff53d8e
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user