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 42 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

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ptankov
❌ eleo007
You have signed the CLA already but the status is still pending? Let us recheck it.

@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 -

@JNKPercona
Copy link
Collaborator

Test name Status
arbiter passed
balancer passed
custom-replset-name passed
custom-tls passed
custom-users-roles passed
custom-users-roles-sharded passed
cross-site-sharded passed
data-at-rest-encryption failure
data-sharded passed
demand-backup passed
demand-backup-fs passed
demand-backup-eks-credentials-irsa passed
demand-backup-physical passed
demand-backup-physical-sharded passed
demand-backup-sharded passed
expose-sharded passed
ignore-labels-annotations passed
init-deploy passed
finalizer passed
ldap passed
ldap-tls passed
limits passed
liveness passed
mongod-major-upgrade passed
mongod-major-upgrade-sharded passed
monitoring-2-0 passed
multi-cluster-service passed
non-voting passed
one-pod passed
operator-self-healing-chaos passed
pitr passed
pitr-sharded passed
pitr-physical passed
pvc-resize passed
recover-no-primary passed
replset-overrides passed
rs-shard-migration passed
scaling passed
scheduled-backup passed
security-context passed
self-healing-chaos passed
service-per-pod passed
serviceless-external-nodes passed
smart-update passed
split-horizon passed
stable-resource-version passed
storage passed
tls-issue-cert-manager passed
upgrade passed
upgrade-consistency passed
upgrade-consistency-sharded-tls passed
upgrade-sharded passed
users passed
version-service passed
We run 54 out of 54

commit: 268b731
image: perconalab/percona-server-mongodb-operator:PR-1735-268b7313

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.

4 participants