Skip to content
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

K8SPSMDB-1213 Add arm64 support for the e2e tests #1735

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open

Conversation

ptankov
Copy link
Contributor

@ptankov ptankov commented Nov 20, 2024

K8SPSMDB-1213 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
We want to support the arm64 architecture for our operator releases. We need to re-work some of the test cases and or the supporting functions in the e2e test cases.

Solution:
The solution is to apply tolerations blocks in the yaml resource definitions on the fly
where needed, e.g.:

tolerations:
  - key: node.kubernetes.io/arch
    operator: Equal
    value: arm64
    effect: NoSchedule

Also, replace old docker images which supported only amd64:
amazon/aws-cli instead of perconalab/awscli
alpine/curl instead of appropriate/curl

we're now using -multi images for:
percona/percona-server-mongodb:7.0.14-8-multi
percona/percona-backup-mongodb:2.7.0-multi
and also the
percona/percona-server-mongodb:4.4-multi
image in cases when we use it for the mongo client.

but in the future hopefully the -multi suffix will disappear.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/XL 500-999 lines label Nov 20, 2024
e2e-tests/upgrade-sharded/run Show resolved Hide resolved
e2e-tests/upgrade/run Show resolved Hide resolved
@ptankov ptankov changed the title K8 spsmdb 1213 K8SPSMDB-1213 Add arm64 support for the e2e tests Nov 20, 2024
@pull-request-size pull-request-size bot added size/XXL 1000+ lines and removed size/XL 500-999 lines labels Nov 25, 2024
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/default-cr/run Show resolved Hide resolved
… also need to rename compare files in addition to update of run file content
@ptankov ptankov marked this pull request as ready for review November 25, 2024 10:22
cw-rbac.yaml.1 Outdated Show resolved Hide resolved
cw-rbac.yaml Outdated Show resolved Hide resolved
cw-rbac.yaml.2 Outdated Show resolved Hide resolved
e2e-tests/data-sharded/run Outdated Show resolved Hide resolved
e2e-tests/default-cr/run Outdated Show resolved Hide resolved
@it-percona-cla
Copy link

it-percona-cla commented Dec 4, 2024

CLA assistant check
All committers have signed the CLA.

@pull-request-size pull-request-size bot added size/XL 500-999 lines and removed size/XXL 1000+ lines labels Dec 11, 2024
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/functions Show resolved Hide resolved
@ptankov ptankov requested a review from eleo007 December 11, 2024 10:03
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/default-cr/run Show resolved Hide resolved
e2e-tests/ldap-tls/run Show resolved Hide resolved
e2e-tests/balancer/run Show resolved Hide resolved
e2e-tests/functions Show resolved Hide resolved
e2e-tests/functions Show resolved Hide resolved
e2e-tests/functions Show resolved Hide resolved
| yq eval '(.spec | select(has("initImage"))).initImage = "'"$IMAGE"'"' \
| yq eval '(.spec | select(has("backup"))).backup.image = "'"$IMAGE_BACKUP"'"' \
| yq eval '.spec.upgradeOptions.apply="Never"'
local temp_cr="$(mktemp)"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
local temp_cr="$(mktemp)"
local temp_cr="$(mktemp)"

(.spec | select(has("pmm"))).pmm.image = "'"$IMAGE_PMM_CLIENT"'" |
(.spec | select(has("initImage"))).initImage = "'"$IMAGE"'" |
(.spec | select(has("backup"))).backup.image = "'"$IMAGE_BACKUP"'" |
.spec.upgradeOptions.apply="Never"' "$1" > $temp_cr
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
.spec.upgradeOptions.apply="Never"' "$1" > $temp_cr
.spec.upgradeOptions.apply="Never"' "$1" >$temp_cr

.spec.upgradeOptions.apply="Never"' "$1" > $temp_cr

if [[ $ARCH == "arm64" ]]; then
yq eval '.spec.replsets[].tolerations += '"$TOLERATIONS_ARM64"' |
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
yq eval '.spec.replsets[].tolerations += '"$TOLERATIONS_ARM64"' |
yq eval '.spec.replsets[].tolerations += '"$TOLERATIONS_ARM64"' |


apply_client() {
if [[ $ARCH == "arm64" ]]; then
yq eval '.spec.template.spec.tolerations += '"$TOLERATIONS_ARM64"'' "$1" | kubectl_bin apply -f -
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
yq eval '.spec.template.spec.tolerations += '"$TOLERATIONS_ARM64"'' "$1" | kubectl_bin apply -f -
yq eval '.spec.template.spec.tolerations += '"$TOLERATIONS_ARM64"'' "$1" | kubectl_bin apply -f -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL 500-999 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants