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
// IMDS may have the MI token already, and have an expiration of less than 2h when we receive the token. We don't want to set that value beyond the ExpiresOn time and potentially miss a refresh
90
90
// So we just return earlier here. See discussion here: https://github.com/Azure/karpenter-provider-azure/pull/391/files#r1648633051
91
91
iftoken.ExpiresOn.Before(twoHoursFromNow) {
92
-
log.FromContext(ctx).Info("XPMT: ExpiresOn %s is before two hours from now %s, not adjusting", token.ExpiresOn, twoHoursFromNow)
92
+
log.FromContext(ctx).Info(fmt.Sprintf("XPMT: ExpiresOn %s is before two hours from now %s, not adjusting", token.ExpiresOn, twoHoursFromNow))
93
93
returntoken, nil
94
94
}
95
-
log.FromContext(ctx).Info("XPMT: adjusting ExpiresOn from %s to %s", token.ExpiresOn, twoHoursFromNow)
95
+
log.FromContext(ctx).Info(fmt.Sprintf("XPMT: adjusting ExpiresOn from %s to %s", token.ExpiresOn, twoHoursFromNow))
96
96
// If the token expires in more than 2 hours, this means we are taking in a new token with a fresh 24h expiration time or one already in the cache that hasn't been modified by us, so we want to set that to two hours so
97
97
// we can refresh it early to avoid the polling bugs mentioned in the above issue
0 commit comments