Skip to content

Repository files navigation

TestConfigurationBundle

Standardized test bundles for deploying OpenShift operator operands during certification testing.

Problem

The certsuite batch script installs operators via OLM but has no generic way to install their operands. Without operands running, many certification tests can't exercise real workloads. This repo fills that gap.

How It Works

certsuite script this repo
───────────────── ─────────
1. Install operator via OLM
2. Wait for CSV to succeed
3. Clone this repo ──────────────────► operator-map.yaml
4. Look up operator name ────────────► → bundle path
5. oc apply -f 00-prerequisites.yaml ► namespaces, RBAC (if present)
6. oc apply -f 01-operand-crs.yaml ──► deploy operand CRs
7. Run 02-validate.sh ───────────────► polls until operand is healthy
8. Run certification tests
9. oc delete -f teardown.yaml ───────► cleanup

Supported Operators

OperatorSource Repo
amq-broker-rhel8activemq-artemis-operator
metallb-operatormetallb-operator
nfdcluster-nfd-operator
numaresources-operatornumaresources-operator
ocs-operatorocs-operator
openshift-gitops-operatorgitops-operator
ptp-operatorptp-operator
redhat-oadp-operatoroadp-operator
sriov-fecsriov-fec-operator
vault-secrets-operatorvault-secrets-operator

Bundle Structure

Each operator bundle lives under bundles/<operator-name>/:

bundles/metallb-operator/
00-prerequisites.yaml # (optional) Namespaces, RBAC, ConfigMaps
01-operand-crs.yaml # Operand CRs to apply (default uncommented, others commented out)
02-validate.sh # Exits 0 when operand is healthy
metadata.yaml # Operator info, health checks
teardown.yaml # Minimal CR refs for oc delete

metadata.yaml

Machine-readable metadata for the operator and health checks:

operator:
name: metallb-operatorrepository: https://github.com/openshift/metallb-operatorinstall:
namespace: metallb-systemchannel: stablecatalog_source: redhat-operatorsoperand:
primary_cr: 01-operand-crs.yamlkind: MetalLBhealth_check:
timeout_seconds: 300conditions:
- type: Availablestatus: "True"

01-operand-crs.yaml

Contains all available CRs for the operator. The default CR is uncommented; additional CRs are commented out and can be enabled by uncommenting them before a run:

# Default operand CR for metallb-operator# Uncomment additional CRs below to deploy them# ---apiVersion: metallb.io/v1beta1kind: MetalLBmetadata:
name: metallbnamespace: metallb-system# ---# Source: metallb.io_v1beta1_ipaddresspool.yaml# apiVersion: metallb.io/v1beta1# kind: IPAddressPool# ...

02-validate.sh

Polls until the operand reaches a healthy state. Accepts namespace as $1:

./bundles/metallb-operator/02-validate.sh metallb-system

teardown.yaml

Contains just enough to delete the operand (apiVersion, kind, metadata):

apiVersion: metallb.io/v1beta1kind: MetalLBmetadata:
name: metallbnamespace: metallb-system

Adding a New Operator

  1. Create bundles/<operator-name>/ directory
  2. Create 01-operand-crs.yaml with all sample CRs from the operator's config/samples — leave the default CR uncommented, comment out the rest
  3. Create 02-validate.sh (must be chmod +x) that polls for operand readiness
  4. Create metadata.yaml with operator info and health check config
  5. Create teardown.yaml with the CR(s) to delete
  6. (Optional) Create 00-prerequisites.yaml for namespaces, RBAC, ConfigMaps
  7. Add an entry to operator-map.yaml:
operators:
my-operator:
bundle_path: bundles/my-operatorrepository: https://github.com/org/my-operatordescription: "My operator description"

Related

  • Certsuite - certification test suite
  • plan.md - full implementation plan including certsuite script modifications

About

PoC for Operator to provide a single, self-contained artifact that the certification tester can consume

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages