Summary
Modify the certsuite script script/run-basic-batch-operators-test.sh to install operands from the TestConfigurationBundle repo after each operator's CSV succeeds.
Details
Fork/branch redhat-best-practices-for-k8s/certsuite and modify the batch test script.
Changes required
1. Add input variables (top of script, INPUTS section)
TEST_BUNDLE_SOURCE="${TEST_BUNDLE_SOURCE:-centralized}" # "centralized" or "packagemanifest" (future)
TEST_BUNDLE_REPO="${TEST_BUNDLE_REPO:-https://github.com/opdev/TestConfigurationBundle.git}"
TEST_BUNDLE_BRANCH="${TEST_BUNDLE_BRANCH:-main}"
TEST_BUNDLE_DIR=""
2. Add clone_test_bundles() function
- Shallow clone the TestConfigurationBundle repo to a temp directory at script start
- Only runs when
TEST_BUNDLE_SOURCE=centralized
- If clone fails, set
TEST_BUNDLE_DIR="" and continue (operand install will be skipped gracefully)
3. Add get_bundle_dir() function
- Single switchpoint for bundle source:
centralized (operator-map.yaml lookup) vs packagemanifest (future)
- Returns the bundle directory path for an operator
4. Add install_operands() function
- Call
get_bundle_dir to locate the bundle
- If no bundle found, log warning and return 0 (skip gracefully)
- Apply
00-prerequisites.yaml if present
- Apply
01-operand-crs.yaml (contains default CR uncommented, others commented out)
- Run
02-validate.sh with timeout from metadata.yaml
5. Add teardown_operands() function
- Call
get_bundle_dir, apply teardown.yaml if present
6. Injection points in main loop
- Clone: Call
clone_test_bundles after catalog setup, before the operator loop
- Install: Call
install_operands after the existing hardcoded multicluster-engine block (block is preserved, generic install runs after it)
- Teardown: Call
teardown_operands before operator uninstall
- Cleanup: Remove temp dir at end of script after catalog deletion
Why the multicluster-engine block is preserved
The existing hardcoded multicluster-engine block (lines 775-791) stays in place:
- It works today and is proven in production
- No test bundle exists for
multicluster-engine yet
- The generic
install_operands call runs after it; once a bundle is created and verified, the hardcoded block can be removed in a follow-up
Dependencies
yq must be available in the CI environment for parsing operator-map.yaml and metadata.yaml
Implementation
Acceptance Criteria
Parent Epic
Test Configuration Bundle for Certsuite Operand Installation
Summary
Modify the certsuite script
script/run-basic-batch-operators-test.shto install operands from the TestConfigurationBundle repo after each operator's CSV succeeds.Details
Fork/branch
redhat-best-practices-for-k8s/certsuiteand modify the batch test script.Changes required
1. Add input variables (top of script, INPUTS section)
2. Add
clone_test_bundles()functionTEST_BUNDLE_SOURCE=centralizedTEST_BUNDLE_DIR=""and continue (operand install will be skipped gracefully)3. Add
get_bundle_dir()functioncentralized(operator-map.yaml lookup) vspackagemanifest(future)4. Add
install_operands()functionget_bundle_dirto locate the bundle00-prerequisites.yamlif present01-operand-crs.yaml(contains default CR uncommented, others commented out)02-validate.shwith timeout frommetadata.yaml5. Add
teardown_operands()functionget_bundle_dir, applyteardown.yamlif present6. Injection points in main loop
clone_test_bundlesafter catalog setup, before the operator loopinstall_operandsafter the existing hardcodedmulticluster-engineblock (block is preserved, generic install runs after it)teardown_operandsbefore operator uninstallWhy the multicluster-engine block is preserved
The existing hardcoded
multicluster-engineblock (lines 775-791) stays in place:multicluster-engineyetinstall_operandscall runs after it; once a bundle is created and verified, the hardcoded block can be removed in a follow-upDependencies
yqmust be available in the CI environment for parsingoperator-map.yamlandmetadata.yamlImplementation
feature/generic-operand-installation01-operand-crs.yaml/02-validate.sh)Acceptance Criteria
install_operandsapplies01-operand-crs.yamlfrom the bundle after operator installmulticluster-engineblock preserved; generic install runs after itget_bundle_dirsupports future switch from centralized to packagemanifest sourceteardown_operandscleans up before operator uninstallParent Epic
Test Configuration Bundle for Certsuite Operand Installation