-
Notifications
You must be signed in to change notification settings - Fork 22
[CLOUDP-352109] Run MCK E2E tests against OCI published helm chart #509
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
viveksinghggits
wants to merge
18
commits into
master
Choose a base branch
from
e2e-tests-on-published-chart
base: master
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
18 commits
Select commit
Hold shift + click to select a range
dfbc534
Publish helm chart to OCI registry for PR patches
viveksinghggits 982c77d
Consume build_scenario via build_info for registry repo and other info
viveksinghggits 0daaf61
Run precommit
viveksinghggits 4c753fc
Address review comments
viveksinghggits 8b511e5
Publish helm chart to OCI registry for PR patches
viveksinghggits 4f50441
Install published helm chart instead of local one, during E2E
viveksinghggits 087e06a
Don't copy entire helm_chart dir, just copy CRDs
viveksinghggits cb2a8d2
Delete not needed file
viveksinghggits b1162ec
Start installing chart from OCI registry in E2E
viveksinghggits 8a50020
Add newline
viveksinghggits c04e43a
Refactor
viveksinghggits 4132fc6
Add 0.0.0 while forming chart version
viveksinghggits 82bf02e
Fix `e2e_meko_mck_upgrade` by using OCI version only when version is …
viveksinghggits 6e641ce
Run precommit
viveksinghggits e96e180
Fix CRDs not found issue by installing CRD from correct path
viveksinghggits 93f3e12
Refactor a little, make consts etc
viveksinghggits eb65be5
Make sure local e2es use local helm chart
viveksinghggits 5cb41a0
Run precommit
viveksinghggits 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
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,8 @@ | ||
| OPERATOR_VERSION_ENV_VAR_NAME = "OPERATOR_VERSION" | ||
|
|
||
| OCI_HELM_REGISTRY_ENV_VAR_NAME = "OCI_HELM_REGISTRY" | ||
| OCI_HELM_REPOSITORY_ENV_VAR_NAME = "OCI_HELM_REPOSITORY" | ||
| OCI_HELM_REGION_ENV_VAR_NAME = "OCI_HELM_REGION" | ||
|
|
||
| LEGACY_OPERATOR_CHART = "mongodb/enterprise-operator" | ||
| MCK_HELM_CHART = "mongodb/mongodb-kubernetes" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,14 @@ | |
| update_configmap, | ||
| ) | ||
| from kubetester.awss3client import AwsS3Client | ||
| from kubetester.helm import helm_install_from_chart, helm_repo_add | ||
| from kubetester.consts import * | ||
| from kubetester.helm import ( | ||
| helm_chart_path_and_version, | ||
| helm_install_from_chart, | ||
| helm_repo_add, | ||
| oci_chart_info, | ||
| oci_helm_registry_login, | ||
| ) | ||
| from kubetester.kubetester import KubernetesTester | ||
| from kubetester.kubetester import fixture as _fixture | ||
| from kubetester.kubetester import running_locally | ||
|
|
@@ -55,9 +62,6 @@ | |
| LEGACY_CENTRAL_CLUSTER_NAME: str = "__default" | ||
| LEGACY_DEPLOYMENT_STATE_VERSION: str = "1.27.0" | ||
|
|
||
| # Helm charts | ||
| LEGACY_OPERATOR_CHART = "mongodb/enterprise-operator" | ||
| MCK_HELM_CHART = "mongodb/mongodb-kubernetes" | ||
| LOCAL_HELM_CHART_DIR = "helm_chart" | ||
|
|
||
| OFFICIAL_OPERATOR_IMAGE_NAME = "mongodb-kubernetes" | ||
|
|
@@ -827,7 +831,7 @@ def _install_multi_cluster_operator( | |
| helm_opts: dict[str, str], | ||
| central_cluster_name: str, | ||
| operator_name: Optional[str] = MULTI_CLUSTER_OPERATOR_NAME, | ||
| helm_chart_path: Optional[str] = LOCAL_HELM_CHART_DIR, | ||
| helm_chart_path: Optional[str] = None, | ||
| custom_operator_version: Optional[str] = None, | ||
| apply_crds_first: bool = False, | ||
| ) -> Operator: | ||
|
|
@@ -836,6 +840,8 @@ def _install_multi_cluster_operator( | |
| # The Operator will be installed from the following repo, so adding it first | ||
| helm_repo_add("mongodb", "https://mongodb.github.io/helm-charts") | ||
|
|
||
| helm_chart_path, custom_operator_version = helm_chart_path_and_version(helm_chart_path, custom_operator_version) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we seem to be calling |
||
|
|
||
| prepare_multi_cluster_namespaces( | ||
| namespace, | ||
| multi_cluster_operator_installation_config, | ||
|
|
||
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.
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.
q: how can we instruct this function to use local helm charts for local tests? Ideally we should be able to set this somewhere in the context files and override it by default locally, for example by specifying it in
local-defaults-context.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.
Yes, that's the plan. I am working on the change that will make sure that we are able to run the tests locally. Will push the changes soon.