diff --git a/e2e-tests/preinit-updates/conf/some-name.yml b/e2e-tests/preinit-updates/conf/some-name.yml new file mode 100644 index 000000000..9b0b27f0e --- /dev/null +++ b/e2e-tests/preinit-updates/conf/some-name.yml @@ -0,0 +1,55 @@ +apiVersion: psmdb.percona.com/v1 +kind: PerconaServerMongoDB +metadata: + name: some-name +spec: + #platform: openshift + image: + imagePullPolicy: Always + allowUnsafeConfigurations: false + updateStrategy: SmartUpdate + backup: + enabled: false + image: perconalab/percona-server-mongodb-operator:0.4.0-backup + replsets: + - name: rs0 + # readinessDelaySec: 40 + # livenessDelaySec: 120 + affinity: + antiAffinityTopologyKey: none + resources: + limits: + cpu: 500m + memory: 0.5G + requests: + cpu: 100m + memory: 0.1G + configuration: | + operationProfiling: + mode: slowOp + slowOpThresholdMs: 100 + security: + enableEncryption: true + redactClientLogData: false + setParameter: + ttlMonitorSleepSecs: 60 + wiredTigerConcurrentReadTransactions: 128 + wiredTigerConcurrentWriteTransactions: 128 + storage: + engine: wiredTiger + wiredTiger: + collectionConfig: + blockCompressor: snappy + engineConfig: + directoryForIndexes: false + journalCompressor: snappy + indexConfig: + prefixCompression: true + volumeSpec: + persistentVolumeClaim: + resources: + requests: + storage: 1Gi + size: 3 + secrets: + users: some-users diff --git a/e2e-tests/preinit-updates/run b/e2e-tests/preinit-updates/run new file mode 100755 index 000000000..c52530afe --- /dev/null +++ b/e2e-tests/preinit-updates/run @@ -0,0 +1,28 @@ +#!/bin/bash + +set -o errexit + +test_dir=$(realpath $(dirname $0)) +. ${test_dir}/../functions +set_debug + +create_infra ${namespace} + +cluster="some-name" +desc "test starts on cluster: ${cluster}" + +apply_cluster ${test_dir}/conf/${cluster}.yml +wait_for_running ${cluster}-rs0 1 "false" +echo "enabling backups" +kubectl_bin patch psmdb ${cluster} --type=merge -p '{"spec":{"backup":{"enabled":true}}}' +echo "sleeping for 7 seconds..." +sleep 7 +echo "changing rs0 resources" +kubectl_bin patch psmdb ${cluster} --type=json -p '[{"op":"replace","path":"/spec/replsets/0/resources/limits/cpu","value":"550m"}]' + +wait_for_running ${cluster}-rs0 3 +wait_cluster_consistency "${cluster}" + +desc 'test passed' + +destroy $namespace diff --git a/e2e-tests/run-pr.csv b/e2e-tests/run-pr.csv index fe55ed9ff..1c60d0407 100644 --- a/e2e-tests/run-pr.csv +++ b/e2e-tests/run-pr.csv @@ -31,6 +31,7 @@ operator-self-healing-chaos pitr pitr-sharded pitr-physical +preinit-updates pvc-resize recover-no-primary replset-overrides diff --git a/e2e-tests/run-release.csv b/e2e-tests/run-release.csv index 8165ad96b..ad56cdda8 100644 --- a/e2e-tests/run-release.csv +++ b/e2e-tests/run-release.csv @@ -32,6 +32,7 @@ operator-self-healing-chaos pitr pitr-sharded pitr-physical +preinit-updates pvc-resize recover-no-primary replset-overrides