Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,16 @@ tests:
cluster_profile: openshift-org-aws
env:
COMPUTE_NODE_TYPE: m5.4xlarge
DEST_REPO: admin/quay:latest
SOURCE_IMAGE: quay.io/projectquay/quay:latest
SETUP_NOOBAA: "true"
post:
- ref: quay-gather
- chain: ipi-aws-post
pre:
- chain: ipi-aws-pre
- ref: quay-install-odf-operator
- ref: quay-install-operator-bundle
- ref: quay-install-quay
- ref: quay-create-admin-user
test:
- ref: quay-test-mirror-image
- ref: quay-test-chainsaw
workflow: ipi-aws
- always_run: false
as: e2e-upgrade
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,16 @@ tests:
cluster_profile: openshift-org-aws
env:
COMPUTE_NODE_TYPE: m5.4xlarge
SETUP_NOOBAA: "true"
post:
- ref: quay-gather
- chain: ipi-aws-post
pre:
- chain: ipi-aws-pre
- ref: quay-install-odf-operator
- ref: quay-install-operator-bundle
- ref: quay-install-quay
- ref: quay-create-admin-user
test:
- ref: quay-test-mirror-image
- ref: quay-test-chainsaw
workflow: ipi-aws
zz_generated_metadata:
branch: redhat-3.17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,125 @@ for _ in {1..60}; do
if [[ -n "$CSV" ]]; then
if [[ "$(oc -n "$OO_INSTALL_NAMESPACE" get csv "$CSV" -o jsonpath='{.status.phase}')" == "Succeeded" ]]; then
echo "ClusterServiceVersion \"$CSV\" ready"
exit 0
CSV_READY=true
break
fi
fi
sleep 10
done
echo "Timed out waiting for CSV to become ready"
exit 1

if [[ "${CSV_READY:-}" != "true" ]]; then
echo "Timed out waiting for CSV to become ready"
exit 1
fi

if [[ "${SETUP_NOOBAA:-false}" != "true" ]]; then
echo "SETUP_NOOBAA not enabled, skipping NooBaa setup"
exit 0
fi

echo "Waiting for NooBaa CRD to be available..."
TIMEOUT=300
ELAPSED=0
while [ "$ELAPSED" -lt "$TIMEOUT" ]; do
if oc get crd noobaas.noobaa.io > /dev/null 2>&1; then
echo "NooBaa CRD is available"
break
fi
sleep 10
ELAPSED=$((ELAPSED + 10))
done
if ! oc get crd noobaas.noobaa.io > /dev/null 2>&1; then
echo "ERROR: NooBaa CRD not available within ${TIMEOUT}s"
oc get csv -n "$OO_INSTALL_NAMESPACE" 2>&1 || true
exit 1
fi

echo "Creating NooBaa..."
cat <<EOF | oc apply -f -
apiVersion: noobaa.io/v1alpha1
kind: NooBaa
metadata:
name: noobaa
namespace: $OO_INSTALL_NAMESPACE
spec:
manualDefaultBackingStore: true
dbResources:
requests:
cpu: '0.1'
memory: 1Gi
coreResources:
requests:
cpu: '0.1'
memory: 1Gi
dbType: postgres
EOF

echo "Waiting for NooBaa to become available (up to 900s)..."
if ! oc -n "$OO_INSTALL_NAMESPACE" wait noobaa/noobaa \
--for=condition=Available --timeout=900s; then
echo "ERROR: NooBaa not available within 900s"
oc get noobaa/noobaa -n "$OO_INSTALL_NAMESPACE" -o yaml 2>&1 || true
oc get pods -n "$OO_INSTALL_NAMESPACE" 2>&1 || true
exit 1
fi

echo "Creating PV-pool backing store..."
cat <<EOF | oc apply -f -
apiVersion: noobaa.io/v1alpha1
kind: BackingStore
metadata:
name: noobaa-default-backing-store
namespace: $OO_INSTALL_NAMESPACE
finalizers:
- noobaa.io/finalizer
labels:
app: noobaa
spec:
type: pv-pool
pvPool:
numVolumes: 1
resources:
requests:
storage: 50Gi
cpu: "500m"
memory: "2Gi"
limits:
cpu: "1"
memory: "4Gi"
EOF

echo "Creating default bucket class..."
cat <<EOF | oc apply -f -
apiVersion: noobaa.io/v1alpha1
kind: BucketClass
metadata:
name: noobaa-default-bucket-class
namespace: $OO_INSTALL_NAMESPACE
labels:
app: noobaa
spec:
placementPolicy:
tiers:
- backingStores:
- noobaa-default-backing-store
EOF

echo "Waiting for backing store to be ready..."
for i in $(seq 1 60); do
BS_PHASE=$(oc -n "$OO_INSTALL_NAMESPACE" get backingstore \
noobaa-default-backing-store \
-o jsonpath='{.status.phase}' 2>/dev/null || echo "NotFound")
if [ "$BS_PHASE" = "Ready" ]; then
echo "Default backing store is ready"
break
fi
echo " [${i}0s] Backing store phase: $BS_PHASE"
sleep 10
done
if [ "$BS_PHASE" != "Ready" ]; then
echo "WARNING: Backing store not ready (phase: $BS_PHASE), proceeding anyway"
oc get backingstore -n "$OO_INSTALL_NAMESPACE" -o yaml 2>&1 || true
fi

echo "NooBaa setup complete"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ ref:
requests:
cpu: 10m
memory: 100Mi
env:
- name: SETUP_NOOBAA
default: "false"
documentation: When true, create a NooBaa CR with backing store and bucket class after ODF installation.
documentation: |-
Install OpenShift Container Storage Operator
Install OpenShift Data Foundation Operator. Optionally sets up NooBaa
object storage with a PV-pool backing store when SETUP_NOOBAA=true.
1 change: 1 addition & 0 deletions ci-operator/step-registry/quay/test-chainsaw/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -euo pipefail

echo "Symlinking oc as kubectl..."
mkdir -p /tmp/bin
ln -sf "$(which oc)" /tmp/bin/kubectl
export PATH="/tmp/bin:${PATH}"

echo "Installing crane..."
GOFLAGS="" go install github.com/google/go-containerregistry/cmd/crane@latest

echo "Downloading chainsaw..."
mkdir -p bin
make chainsaw

REPORT_ARGS="--report-path ${ARTIFACT_DIR} --report-format XML"
ASSERT_TIMEOUT="--assert-timeout 20m"

echo "Running chainsaw e2e tests..."
make test-e2e CHAINSAW_PARALLEL=1 CHAINSAW_EXTRA_ARGS="--report-name junit_chainsaw_e2e ${REPORT_ARGS} ${ASSERT_TIMEOUT}"

echo "Running chainsaw ca-rotation tests..."
make test-e2e-destructive CHAINSAW_PARALLEL=1 CHAINSAW_EXTRA_ARGS="--report-name junit_chainsaw_ca_rotation ${REPORT_ARGS} ${ASSERT_TIMEOUT}"

echo "Chainsaw e2e tests completed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"path": "quay/test-chainsaw/quay-test-chainsaw-ref.yaml",
"owners": {
"approvers": [
"BillDett",
"HammerMeetNail",
"LiZhang19817",
"SeanZhao-redhat",
"aroyoredhat",
"cubismod",
"dongboyan77",
"huweihua-redhat",
"jbpratt",
"kleesc",
"lechuk47",
"sunandadadi",
"syed"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ref:
as: quay-test-chainsaw
from: src-oc
commands: quay-test-chainsaw-commands.sh
resources:
requests:
cpu: 100m
memory: 200Mi
timeout: 1h
documentation: |-
Runs Chainsaw e2e tests for the quay-operator from the source repo.
Executes reconcile and HPA test suites against an OpenShift cluster
with ODF and the quay operator bundle installed.