-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement kubeconfig rotation #48
Conversation
Skipping CI for Draft Pull Request. |
} | ||
var clusterToUpdate imv1.GardenerCluster | ||
|
||
err := controller.Client.Get(ctx, key, &clusterToUpdate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a comment for myself - this prevents 409 error
now := time.Now() | ||
alreadyValidFor := now.Sub(lastSyncTime) | ||
|
||
return alreadyValidFor.Minutes() >= rotationPeriodRatio*rotationPeriod.Minutes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to remove this rotationPeriodRatio parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without that, @akgalwas had a test case where instead after 36 minutes, rotation happened after ~72 minutes and if I recall correctly, for 12 minutes the kubeconfig was invalid.
return false | ||
} | ||
|
||
readyState := newGardenerCluster.Status.State == imv1.ReadyState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happened to fail for @akgalwas locally
What should be taken into account during review:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Changes proposed in this pull request:
Related issue(s)
#10