Skip to content

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
@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
… 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
@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
@ptankov ptankov requested a review from eleo007 December 11, 2024 10:03
| 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 passed
data-sharded passed
demand-backup passed
demand-backup-fs passed
demand-backup-eks-credentials-irsa passed
demand-backup-physical passed
demand-backup-physical-sharded failure
demand-backup-sharded passed
expose-sharded failure
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: 753d0df
image: perconalab/percona-server-mongodb-operator:PR-1735-753d0dfe

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