Skip to content

Conversation

helderjs
Copy link
Collaborator

All Submissions:

  • Have you signed our CLA?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if there is one).
  • Update docs/release-notes/release-notes-template.md if your changes should be included in the release notes for the next release.

Copy link
Contributor

github-actions bot commented Aug 16, 2024

@igor-karpukhin igor-karpukhin self-requested a review August 22, 2024 10:24
@josvazg josvazg self-assigned this Aug 23, 2024
@josvazg josvazg marked this pull request as draft August 27, 2024 10:06
@josvazg
Copy link
Collaborator

josvazg commented Aug 27, 2024

Converted to draft, as there are changes going before this one that will require heavy rebasing.

@josvazg josvazg removed their assignment Sep 4, 2024
@helderjs helderjs force-pushed the CLOUDP-266544-independent-dbuser branch from 94cc6f7 to 1c8bdff Compare September 30, 2024 10:18
Base automatically changed from CLOUDP-266544-independent-dbuser to main October 2, 2024 09:21
@helderjs helderjs force-pushed the CLOUDP-267957-independent-deployment branch 2 times, most recently from 29948d6 to f229dbc Compare October 4, 2024 14:30
@helderjs helderjs marked this pull request as ready for review October 4, 2024 14:33

func (r *AtlasDeploymentReconciler) getProjectDatabaseUsers(ctx context.Context, projectID string) ([]*akov2.AtlasDatabaseUser, error) {
databaseUsers := &akov2.AtlasDatabaseUserList{}
err := r.Client.List(ctx, databaseUsers, &client.ListOptions{})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helderjs @josvazg question: This will list all users in Kubernetes rather than caching them. What was wrong with the indexers/cache?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without going through all users and filtering them manually, the deployment would not create the secrets for all the users under their project. Basically, independent deployment would update independent users, linked would update only linked. In order to keep everything in sync we have to do that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't understand. The indexers are being updated every time a DB user resource is observed. What loss of information would we have if using a cache?

Copy link
Collaborator

@igor-karpukhin igor-karpukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@helderjs helderjs merged commit 4692512 into main Oct 14, 2024
56 checks passed
@helderjs helderjs deleted the CLOUDP-267957-independent-deployment branch October 14, 2024 09:28
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.

4 participants