Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ super-linter.log
.ansible
/ocp-primary.yaml
/ocp-secondary.yaml
tests/ci/.results/
tests/ci/.pytest_cache/
tests/ci/__pycache__/
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ install-byoc: ramen-prereq pattern-install ## Installs the pattern onto a cluste
ramen-prereq: ## Check if values.byoc false do nothing, else run the precheck against clusters accessed from values-secrets
echo "Running precheck for ramendr"
cd ansible && ansible-playbook -i hosts $(EXTRA_ARGS) $(EXTRA_VARS) playbooks/validate_byoc.yml

2 changes: 1 addition & 1 deletion overrides/values-cluster-names.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ drpc:
# ./pattern.sh make install-byoc.
# That target will run a validation play to ensure the cluster
# setup will work with ramen patterns
byoc: false
byoc: true
21 changes: 21 additions & 0 deletions overrides/values-odf-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,24 @@ storageSystem:

objectStorage:
enable: true

odf:
# Workaround for a Rook/ODF bug: the default zone topology spread constraint on OSD
# prepare pods requires device-class=ssd, a label only added after OSD initialization,
# not during prepare. The constraint matches zero pods and is a no-op, allowing all
# 3 prepare pods to land on the same node. This sets a hard per-hostname constraint
# that actually matches rook-ceph-osd-prepare pods, ensuring one prepare pod per node.
# Requires openshift-data-foundations chart >= 0.3.2 (exposes odf.preparePlacement).
# When using OPP chart <= 0.3.1, the odf-prepare-patch ArgoCD app applies this patch
# as a PostSync hook instead.
preparePlacement:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- rook-ceph-osd-prepare
4 changes: 2 additions & 2 deletions pattern-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ requirements:
platform:
aws:
replicas: 3
type: m5.2xlarge
type: m5.4xlarge
controlPlane:
platform:
aws:
replicas: 3
type: m5.xlarge
type: m5.4xlarge
spoke: # Managed DR clusters (primary/secondary)
compute:
platform:
Expand Down
32 changes: 32 additions & 0 deletions tests/ci/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CI Tests for ramendr-starter-kit

Pytest is invoked per-clustergroup from the repository root via the `interop-test` Tekton task:

```console
pytest -lv test_<TARGET_CLUSTERGROUP>.py --junit-xml .results/test_<TARGET_CLUSTERGROUP>.xml
```

## Required environment variables

| Variable | Description |
|---|---|
| `VP_HUBCONFIG` | Path to kubeconfig for the hub cluster |
| `VP_SPOKECONFIG` | Path to kubeconfig for `ocp-primary` (DR spoke 1) |
| `VP_SPOKECONFIG_SECONDARY` | Path to kubeconfig for `ocp-secondary` (DR spoke 2) |
| `TARGET_CLUSTERGROUP` | Clustergroup to test (defaults to `hub`) |

## Running tests locally

From the repository root:

```bash
VP_HUBCONFIG=~/.kube/hub-config \
VP_SPOKECONFIG=~/.kube/spoke-primary-config \
VP_SPOKECONFIG_SECONDARY=~/.kube/spoke-secondary-config \
TARGET_CLUSTERGROUP=odf \
./pattern.sh make run-ci-tests
```

## Test coverage

- `test_odf.py` — hub-side operator subscriptions, pod health, ACM ManagedCluster status, ArgoCD reachability and application health for all three clusters
1 change: 1 addition & 0 deletions tests/ci/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.1.0"
1 change: 1 addition & 0 deletions tests/ci/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from validatedpatterns_tests.interop.conftest_openshift import * # noqa
15 changes: 15 additions & 0 deletions tests/ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ansible-core==2.18.*
ansible-runner
awxkit
kubernetes
openshift
boto3>=1.21
botocore>=1.24
awscli>=1.22
azure-cli>=2.34
gcloud
humanize
pytz
pytest
junitparser
vp-qe-test-common @ git+https://github.com/validatedpatterns/vp-qe-test-common.git@v1
Loading