Allow for more than one deployment per test under cloud-qa #173
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.
Summary
This patch allows to deploy more than one database managed by cloud-qa in a single e2e test.
Currently it's only possible under Ops Manager tests which deploys it in the same test.
How does it work for OM?
Multiple mdb resources under OM are possible thanks to resource.confgure() function, which requires to pass MongoDBOpsManager resource. It creates -project config map and credentials secret by using api keys that are available because there is an OM instance deployed in the same test.
How it was for cloud-qa tests?
Our tests were able to use only one "my-project" config map and credentials, which is created before the test pod is scheduled (configure_operator.sh). It contains fixed project name, which equals to the current namespace (a random string in CI). Reusing this config map leads to attempting to deploy mdb resource in the same cloud-qa project, which then the operator rejects.
What this PR changes for cloud-qa tests?
We hook into configure function allowing for passing None as ops manager resource. In this case we clone
my-project
config map and overwrite projectId to '{namespace}-{resourceName}'. The operator will then create a new cloud-qa project with that name allowing for running multiple cloud-qa-managed resources in one test.Proof of Work
TBD as CI has a fatal failure.
Checklist
Reminder (Please remove this when merging)