-
Notifications
You must be signed in to change notification settings - Fork 25
[CLOUDP-350669] Publish helm chart to OCI registry for dev/staging workflows #507
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
Conversation
MCK 1.6.0 Release NotesNew Features
Bug Fixes
|
5f0938b to
1b61956
Compare
e885549 to
92d2fe6
Compare
1. Move file from scripts to scripts/relese 2. call python files from .sh files so that we can use build_scenario env var
|
Hi @MaciejKaras, |
|
@anandsyncs can you please have a look as well? |
|
@viveksinghggits It would also be great if you can mention in the PR description what exactly is the issue that prevents us from calling |
I can do that. |
) # Summary As part of our work to move towards OCI compatible container registries for our helm chart, we are also planning to run our E2E tests against the helm chart that we publish to OCI. This will make sure that we are testing in our E2E what we are providing to our customers. As part of this effort we have already [raised a PR](#507) that starts publishing our helm chart to the OCI container registry during dev/staging workflows. This PR goes and changes our E2E tests to start consuming the helm chart from OCI registry instead of the local helm chart repo. Additional unrelated change is to fix `kubectl-mongodb` location that is used for gke code snippets. The fix is to add missing `workdir` path suffix. ## Proof of Work Successful CI on this PR. I also ran the test `e2e_replica_set_migration` locally and it was successful. The logs are [here](https://gist.github.com/viveksinghggits/1b6403ffd43d53759a1714aa9cf04f30). `publish_helm_chart` example output: ``` [2025/11/05 22:11:19.857] Running command 'subprocess.exec' in function 'publish_helm_chart' (step 7 of 7). [2025/11/05 22:11:19.919] INFO 2025-11-05 21:11:19,919 [publish_helm_chart] Packaging chart: mongodb-kubernetes with Version: 0.0.0+690bbc0f836fbf0007154375 [2025/11/05 22:11:19.959] INFO 2025-11-05 21:11:19,959 [publish_helm_chart] Successfully executed: helm package --version 0.0.0+690bbc0f836fbf0007154375 helm_chart [2025/11/05 22:11:19.959] INFO 2025-11-05 21:11:19,959 [publish_helm_chart] Successfully packaged chart and saved it to: /data/mci/55da5d1be5488b41a9ec4e7d02041a86/src/github.com/mongodb/mongodb-kubernetes/mongodb-kubernetes-0.0.0+690bbc0f836fbf0007154375.tgz [2025/11/05 22:11:19.959] INFO 2025-11-05 21:11:19,959 [publish_helm_chart] Determined OCI Registry: oci://268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb/helm-charts [2025/11/05 22:11:19.959] INFO 2025-11-05 21:11:19,959 [publish_helm_chart] Pushing chart to registry: oci://268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb/helm-charts [2025/11/05 22:11:20.848] INFO 2025-11-05 21:11:20,848 [publish_helm_chart] Successfully executed: helm push mongodb-kubernetes-0.0.0+690bbc0f836fbf0007154375.tgz oci://268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb/helm-charts [2025/11/05 22:11:20.848] INFO 2025-11-05 21:11:20,848 [publish_helm_chart] Helm Chart mongodb-kubernetes:0.0.0+690bbc0f836fbf0007154375 was published successfully! [2025/11/05 22:11:20.858] Finished command 'subprocess.exec' in function 'publish_helm_chart' (step 7 of 7) in 1.001053371s. ``` Downloading the chart with `helm pull oci://268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb/helm-charts/mongodb-kubernetes --untar --version 0.0.0+690bbc0f836fbf0007154375` you can see that the `Chart.yaml` version was properly updated: ```yaml apiVersion: v2 description: 'MongoDB Controllers for Kubernetes translate the human knowledge of creating a MongoDB instance into a scalable, repeatable, and standardized method. ' home: https://github.com/mongodb/mongodb-kubernetes icon: https://mongodb-images-new.s3.eu-west-1.amazonaws.com/leaf-green-dark.png keywords: - mongodb - database - nosql kubeVersion: '>=1.16-0' maintainers: - email: [email protected] name: MongoDB name: mongodb-kubernetes type: application version: 0.0.0+690bbc0f836fbf0007154375 ``` Also [run release](https://evergreen.mongodb.com/version/690cf486c59aec0007dd2ba4?redirect_spruce_users=true) test and e2e smoke tests are also passing (ignore `ibm_power`, they are fixed in #573) ## Checklist - [x] Have you linked a jira ticket and/or is the ticket in the title? - [x] Have you checked whether your jira ticket required DOCSP changes? - [x] Have you added changelog file? - use `skip-changelog` label if not needed - refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details --------- Co-authored-by: Maciej Karaś <[email protected]>
Summary
In an effort to start using OCI compatible container registries as our helm chart repos, this PR makes the change package and publish our helm chart to ECR registry. A new task
publish_helm_chartis introduced in the build variantinit_test_runwhich packages and publishes the chart.The details about the versioning of the chart can be found in the document here.
There were two wrappers (shell scripts) introduced as part of this and the reason was we wanted to call the python scripts (
helm_registry_login.pyandpublish_helm_chart.py) from.evergreen-function.yamlpassing an argument that's build scenario. Build scenario is already set as env var in the evg host, but there isn't a way to do this, in other words, we couldn't do below from the.evergreen-functions.yamlfileAnd because of that we had to write the wrapper that would call the python script with correct argument after reading the env var.
Proof of Work
patch and staging evg runs. Notice at the end of the log that dev workflow is pushing to diff repository and staging to different.
Successful run of
init_test_runvariant in this PR would also work.Checklist
skip-changeloglabel if not needed