in internal/alloydb/instance.go [272:283]
func refreshDuration(now, certExpiry time.Time) time.Duration {
d := certExpiry.Sub(now)
if d < time.Hour {
// Something is wrong with the certification, refresh now.
if d < refreshBuffer {
return 0
}
// Otherwise wait until 4 minutes before expiration for next refresh cycle.
return d - refreshBuffer
}
return d / 2
}