Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.01 KB

File metadata and controls

46 lines (35 loc) · 2.01 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Purpose

Test Configuration Bundle repo for OpenShift operator certification testing. Stores test bundles that the certsuite script uses to deploy operands after installing operators via OLM.

Repo Layout

operator-map.yaml              # Maps operator names → bundle paths + source repos
bundles/<operator>/
  00-prerequisites.yaml        # (optional) Namespaces, RBAC, ConfigMaps
  01-operand-crs.yaml          # Operand CRs (default uncommented, others commented out)
  02-validate.sh               # Exits 0 when operand is healthy
  metadata.yaml                # Operator info, namespace, health checks
  teardown.yaml                # CR(s) to delete during cleanup

How It Works

  1. Certsuite script clones this repo
  2. Looks up operator name in operator-map.yaml → gets bundle_path
  3. Applies 00-prerequisites.yaml if present
  4. Applies 01-operand-crs.yaml to deploy operand CRs
  5. Runs 02-validate.sh <namespace> to wait for operand readiness
  6. After tests, applies teardown.yaml via oc delete -f

Adding a New Operator Bundle

  1. Create bundles/<operator-name>/ directory
  2. Create 01-operand-crs.yaml with all sample CRs — default CR uncommented, others commented out
  3. Create 02-validate.sh (must be executable) that polls for operand readiness
  4. Create metadata.yaml with operator info and health check config
  5. Create teardown.yaml listing the CRs to delete
  6. (Optional) Create 00-prerequisites.yaml for namespaces, RBAC, ConfigMaps
  7. Add entry to operator-map.yaml

Conventions

  • 01-operand-crs.yaml contains all CRs; only the default is uncommented
  • Validate scripts accept namespace as $1, default to the operator's standard namespace
  • Validate scripts use a polling loop with configurable timeout (default 60s)
  • teardown.yaml only needs apiVersion/kind/metadata (enough for oc delete)
  • operator-map.yaml uses the OLM package name as the key