-
Notifications
You must be signed in to change notification settings - Fork 106
CLOUDP-358677: Add Flex e2e2 test #3036
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
Open
josvazg
wants to merge
7
commits into
main
Choose a base branch
from
CLOUDP-358677/add-flex-e2e2-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3708052
CLOUDP-358677: Add Flex e2e2 test
josvazg 65ec82d
Fix the new e2e2 test
josvazg 600d201
Refactor and simplify e2e2
josvazg c70a78d
Refactor YAML test sourcing
josvazg 447d4f1
bugfix
josvazg b2948a9
Fix e2e2 test
josvazg 64f0fcf
Fix e2e2 Ctrl+C cleanup
josvazg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| apiVersion: atlas.generated.mongodb.com/v1 | ||
| kind: FlexCluster | ||
| metadata: | ||
| name: flexy | ||
| spec: | ||
| connectionSecretRef: | ||
| name: mongodb-atlas-operator-api-key | ||
| v20250312: | ||
| groupId: "60f1b3c4e4b0e8b8c8b8c8b" | ||
| entry: | ||
| name: flexy | ||
| terminationProtectionEnabled: true | ||
| providerSettings: | ||
| backingProviderName: GCP | ||
| regionName: CENTRAL_US | ||
|
|
29 changes: 29 additions & 0 deletions
29
config/samples/atlas_generated_v1_flexcluster_with_groupref.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| apiVersion: atlas.generated.mongodb.com/v1 | ||
| kind: Group | ||
| metadata: | ||
| name: my-group-for-flexcluster | ||
| spec: | ||
| connectionSecretRef: | ||
| name: mongodb-atlas-operator-api-key | ||
| v20250312: | ||
| entry: | ||
| orgId: "60f1b3c4e4b0e8b8c8b8c8b" | ||
| name: my-group-for-flexcluster | ||
| --- | ||
| apiVersion: atlas.generated.mongodb.com/v1 | ||
| kind: FlexCluster | ||
| metadata: | ||
| name: flexy-with-groupref | ||
| annotations: | ||
| some-tag: tag | ||
| spec: | ||
| v20250312: | ||
| groupRef: | ||
| name: my-group-for-flexcluster | ||
| entry: | ||
| name: flexy-with-groupref | ||
| terminationProtectionEnabled: true | ||
| providerSettings: | ||
| backingProviderName: GCP | ||
| regionName: CENTRAL_US | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: atlas.generated.mongodb.com/v1 | ||
| kind: Group | ||
| metadata: | ||
| name: my-group | ||
| spec: | ||
| connectionSecretRef: | ||
| name: mongodb-atlas-operator-api-key | ||
| v20250312: | ||
| entry: | ||
| orgId: "60f1b3c4e4b0e8b8c8b8c8b" | ||
| name: my-group | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 doable in this case but not all objects have Group IDs (i.e. DatabaseUsers). I rather suggest blocking deletion of the
Groupin the group reconciler in the first place: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.
The good news is that we have the mapping functions auto-generated already!
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 just tried the above code and it works nicely. I first:
Cluster, aFlexCluster, and aDatabaseUserdepend on it:Cluster, aFlexCluster, and aDatabaseUser. In the meantime the count of dependend resources went down: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.
side note: this is a pretty canonical use of indexes in the combination with finalizers (in our case nicely gated via the universal state machine)