-
Notifications
You must be signed in to change notification settings - Fork 106
CLOUDP-84905: support user expiration #178
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
Conversation
| log.Infof("Removed %d connection secrets", len(secrets)) | ||
| } | ||
| // We ignore the error as it will be printed by the function | ||
| _ = removeStaleSecretsByUserName(r.Client, project.ID(), userName, *dbUser, log) |
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.
moved to a single function as this code is reused by different places
| return false, err | ||
| } | ||
|
|
||
| // performing some normalization of dates |
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.
this is necessary to correctly compare strings as the date returned by Atlas may be different than the one submitted by the Atlas Operator
…to CLOUDP-84905_mark-user-expired
…to CLOUDP-84905_mark-user-expired
…into CLOUDP-84905_mark-user-expired
This PR adds support for database user expiration. If the
spec.DeleteAfterDateis less than the current date - no API requests are sent to Atlas, the resource is marked asready: falseandDatabaseUserReadyType: falseand connection secrets are removed. Note, that the retry of the reconciliation doesn't happen in this case as it's the user that needs to update the spec to fix this