Skip to content

Conversation

@vasilevp
Copy link
Contributor

No description provided.

@vasilevp vasilevp self-assigned this Mar 16, 2021
Copy link
Contributor

@antonlisovenko antonlisovenko left a 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,
Copy link
Contributor

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{})
Copy link
Contributor

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

Copy link
Contributor Author

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 🙂

Copy link
Contributor

@antonlisovenko antonlisovenko left a 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

@vasilevp vasilevp merged commit 85654e6 into main Mar 31, 2021
@vasilevp vasilevp deleted the CLOUDP-82589-ensure-cluster-secrets branch March 31, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants