Remove fired event when a certificate request is re-scheduled when

failed but < 1 hour

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
This commit is contained in:
JoshVanL 2019-08-13 12:21:28 +01:00
parent eed1e4ba21
commit f1e4e2b16c
2 changed files with 3 additions and 3 deletions

View File

@ -554,9 +554,8 @@ func (c *certificateRequestManager) processCertificate(ctx context.Context, crt
return nil
}
// We don't fire an event here as this could be called multiple times in quick succession
c.scheduledWorkQueue.Add(key, time.Hour)
c.recorder.Eventf(crt, corev1.EventTypeNormal, "CertificateRequestReschedule", "The CertificateRequest %q has failed and is scheduled for a retry in 1 hour", existingReq.Name)
return nil
}

View File

@ -1128,7 +1128,8 @@ func TestProcessCertificate(t *testing.T) {
})),
},
ExpectedActions: []testpkg.Action{},
ExpectedEvents: []string{`Normal CertificateRequestReschedule The CertificateRequest "test-850937773" has failed and is scheduled for a retry in 1 hour`},
// We don't fire an event here as this could be called multiple times in quick succession
ExpectedEvents: []string{},
},
},
}