Skip to content

[pipeline] add multiarch mco #156

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
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

[pipeline] add multiarch mco #156

wants to merge 11 commits into from

Conversation

nammn
Copy link
Collaborator

@nammn nammn commented May 23, 2025

Summary

  • adding multiarch to the operator

Proof of Work

  • passing ci while skipping arm
  • passing ci while running arm build
  • pulling multiarch image
docker run --rm -it --platform linux/arm64 --entrypoint sh 268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes:6852aae56808a40007526b93
Unable to find image '268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes:6852aae56808a40007526b93' locally
6852aae56808a40007526b93: Pulling from dev/mongodb-kubernetes
88dac9674920: Already exists 
01860f9dcfa8: Pull complete 
ef547372e92b: Pull complete 
e177c021bea7: Pull complete 
f10b6cc419b7: Pull complete 
05a62aa57d3f: Pull complete 
Digest: sha256:5c158225fad4d9b92b28b43e034f46eaacc6488e74846e3e22fc6e5d0b243e05
Status: Downloaded newer image for 268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes:6852aae56808a40007526b93
sh-5.1$ uname -a
Linux 0c05ec3b5548 6.10.14-linuxkit #1 SMP Tue Apr 15 16:00:54 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
sh-5.1$ 
(venv) ~/projects/mongodb-kubernetes git:[multi-arch-mco]
docker run --rm -it --platform linux/amd64 --entrypoint sh 268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes:6852aae56808a40007526b93
Unable to find image '268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes:6852aae56808a40007526b93' locally
6852aae56808a40007526b93: Pulling from dev/mongodb-kubernetes
ff6f4d5fce2a: Already exists 
8c4dc0e68dba: Pull complete 
433bb9a7e77e: Pull complete 
3f00ac9cf359: Pull complete 
11b2571dd667: Pull complete 
05a62aa57d3f: Pull complete 
Digest: sha256:5c158225fad4d9b92b28b43e034f46eaacc6488e74846e3e22fc6e5d0b243e05
Status: Downloaded newer image for 268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes:6852aae56808a40007526b93
sh-5.1$ uname -a
Linux 03d6c9cd16d9 6.10.14-linuxkit #1 SMP Tue Apr 15 16:00:54 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you checked for release_note changes?

Reminder (Please remove this when merging)

  • Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible
  • Our Short Guide for PRs: Link
  • Remember the following Communication Standards - use comment prefixes for clarity:
    • blocking: Must be addressed before approval.
    • follow-up: Can be addressed in a later PR or ticket.
    • q: Clarifying question.
    • nit: Non-blocking suggestions.
    • note: Side-note, non-actionable. Example: Praise
    • --> no prefix is considered a question

output:
- registry: $(inputs.params.registry)/operator-context
tag: $(inputs.params.version_id)
- registry: $(inputs.params.registry)/mongodb-kubernetes
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

all of those repo changes should be fine as they are targeting $(inputs.params.registry) which points to ecr

Copy link
Contributor

Choose a reason for hiding this comment

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

how that worked before? So we didn't publish -context images to quay at all? There is no operator-context repo in quay.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a stage in this file called operator-context-release (now called mongodb-kubernetes-release) which retags the image from ecr to quay. The quay_registry already contains image name and this didn't change.

@nammn nammn marked this pull request as ready for review June 18, 2025 13:23
@nammn nammn requested a review from a team as a code owner June 18, 2025 13:23
@nammn nammn requested a review from Julien-Ben June 23, 2025 11:53
@nammn nammn requested review from lsierant and MaciejKaras June 23, 2025 13:13
current_span.set_attribute("mck.image_name", image_name)
current_span.set_attribute("mck.architecture", architectures)

ecr_registry = os.environ.get("BASE_REPO_URL", "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we should fail if not set. We should require running it with some context at least.

Copy link
Contributor

@lsierant lsierant left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +524 to +525
ecr_registry = os.environ.get("BASE_REPO_URL", "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev")
base_repo = QUAY_REGISTRY_URL if is_release else ecr_registry
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this is needed. Looking into the definition of build_image_generic I see that registry_address is set to the quay_registry arg in sonar. In the operator_build_configuration method we already read BASE_REPO_URL and set it in the registry arg for sonar.

@julien-redel julien-redel mentioned this pull request Jun 27, 2025
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