download request controller: fix bug in determining expiration

Signed-off-by: Steve Kriss <steve@heptio.com>
This commit is contained in:
Steve Kriss
2018-08-16 17:12:31 -07:00
parent 7007f198e1
commit 74043ab428

View File

@@ -197,7 +197,7 @@ func (c *downloadRequestController) generatePreSignedURL(downloadRequest *v1.Dow
func (c *downloadRequestController) deleteIfExpired(downloadRequest *v1.DownloadRequest) error {
logContext := c.logger.WithField("key", kube.NamespaceAndName(downloadRequest))
logContext.Info("checking for expiration of DownloadRequest")
if downloadRequest.Status.Expiration.Time.Before(c.clock.Now()) {
if downloadRequest.Status.Expiration.Time.After(c.clock.Now()) {
logContext.Debug("DownloadRequest has not expired")
return nil
}