-
Notifications
You must be signed in to change notification settings - Fork 107
Ensure secrets on cluster update #171
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
antonlisovenko
left a comment
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.
My hypothesis that querying the Atlas DB users won't work because the password won't be returned.
This can be proved/disproved by int tests I believe.
| DBUserName: dbUser.Username, | ||
| ConnURL: cluster.ConnectionStrings.Standard, | ||
| SrvConnURL: cluster.ConnectionStrings.StandardSrv, | ||
| Password: dbUser.Password, |
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.
I'm not sure this will work - the password will be empty on GET requests
| } | ||
|
|
||
| func ensureConnectionSecrets(ctx context.Context, wctx *workflow.Context, k8sClient client.Client, project *mdbv1.AtlasProject, cluster *mongodbatlas.Cluster) workflow.Result { | ||
| dbUsers, _, err := wctx.Client.DatabaseUsers.List(ctx, project.ID(), &mongodbatlas.ListOptions{}) |
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.
we need to query K8s database users as we know the passwords for them only - not for Atlas db users
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.
Ah, that makes sense... Guess this is going to be a bit more complicated then 🙂
antonlisovenko
left a comment
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.
👍 as soon as the tests are green
No description provided.