You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
klog.V(2).InfoS("Internal registry pull secret auth data cannot be parsed", "ns", imagePullSecret.Namespace, "name", imagePullSecret.Name)
289
-
returnfalse, time.Now()
290
+
returnfalse, nil
290
291
}
291
292
// there should be an entries for each internal registry url
292
293
iflen(auth) !=len(urls) {
293
294
klog.V(2).InfoS("Internal registry pull secret auth data does not contain the correct number of entries", "ns", imagePullSecret.Namespace, "name", imagePullSecret.Name, "expected", len(urls), "actual", len(auth))
294
-
returnfalse, time.Now()
295
+
returnfalse, nil
295
296
}
296
297
matches:=0
297
298
CheckUrl:
@@ -305,7 +306,7 @@ CheckUrl:
305
306
}
306
307
ifmatches!=len(urls) {
307
308
klog.V(2).InfoS("Internal registry pull secret needs to be refreshed", "reason", "auth data does not contain the correct entries", "ns", imagePullSecret.Namespace, "name", imagePullSecret.Name, "expected", urls, "actual", reflect.ValueOf(auth).MapKeys())
308
-
returnfalse, time.Now()
309
+
returnfalse, nil
309
310
}
310
311
311
312
// track the earliest refresh time of the token (they should all be the same, but check anyway)
@@ -316,10 +317,10 @@ CheckUrl:
316
317
token, err:=jwt.ParseSigned(entry.Password)
317
318
iferr!=nil {
318
319
klog.V(2).InfoS("Internal registry pull secret needs to be refreshed", "reason", "auth token cannot be parsed", "ns", imagePullSecret.Namespace, "name", imagePullSecret.Name, "url", url, "error", err)
319
-
returnfalse, time.Now()
320
+
returnfalse, nil
320
321
}
321
322
322
-
// was token created with previoud token signing cert?
323
+
// was token created with previous token signing cert?
323
324
varvalidKeyIDbool
324
325
for_, kid:=rangekids {
325
326
iftoken.Headers[0].KeyID==kid {
@@ -329,29 +330,39 @@ CheckUrl:
329
330
}
330
331
if!validKeyID {
331
332
klog.V(2).InfoS("Internal registry pull secret needs to be refreshed", "reason", "auth token was not signed by a current signer", "ns", imagePullSecret.Namespace, "name", imagePullSecret.Name, "url", url, "error", err)
332
-
returnfalse, time.Now()
333
+
returnfalse, nil
333
334
}
334
335
335
336
varclaims jwt.Claims
336
337
// "unsafe" in the following API just means we are not validating the signature
0 commit comments