-
Notifications
You must be signed in to change notification settings - Fork 49
rotator: stop exiting process on secret refresh #491
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -339,8 +339,7 @@ func (cr *CertRotator) refreshCertIfNeeded() (bool, error) { | |
| rotatedCA = true | ||
| crLog.Info("server certs refreshed") | ||
| if cr.RestartOnSecretRefresh { | ||
| crLog.Info("Secrets have been updated; exiting so pod can be restarted (This behaviour can be changed with the option RestartOnSecretRefresh)") | ||
| os.Exit(0) | ||
| crLog.Info("Secrets have been updated; RestartOnSecretRefresh is deprecated and ignored to avoid restart loops") | ||
| } | ||
| return true, nil | ||
|
Comment on lines
339
to
344
|
||
| } | ||
|
|
@@ -353,8 +352,7 @@ func (cr *CertRotator) refreshCertIfNeeded() (bool, error) { | |
| } | ||
| crLog.Info("server certs refreshed") | ||
| if cr.RestartOnSecretRefresh { | ||
| crLog.Info("Secrets have been updated; exiting so pod can be restarted (This behaviour can be changed with the option RestartOnSecretRefresh)") | ||
| os.Exit(0) | ||
| crLog.Info("Secrets have been updated; RestartOnSecretRefresh is deprecated and ignored to avoid restart loops") | ||
| } | ||
|
Comment on lines
341
to
356
|
||
| return true, nil | ||
| } | ||
|
|
||
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.
RestartOnSecretRefreshis now effectively a no-op but the only signal to callers is a runtime log. Since this is an exported field, consider adding a GoDoc deprecation marker (e.g., aDeprecated:comment on the field or type) so API consumers and linters can detect the deprecation without relying on logs.