Validation Libraries
The validation libraries provide pre-deployment checks, tenant isolation validation, integration testing, and pipeline validation. These modules catch configuration errors before they reach the cluster.
Source: scripts/lib/validate/
pre-deploy.sh -- Pre-Deployment Checks
Module: scripts/lib/validate/pre-deploy.sh
Validates configuration before deployment to catch issues early. Run this as part of CI/CD or before manual deployments.
Validation Functions
| Function | Description |
|---|---|
validate_image_versions | Check Docker image versions for known incompatibilities |
validate_helm_values | Ensure Helm values files are consistent |
validate_secrets_references | Verify all secretKeyRef references exist |
validate_port_consistency | Check ports match components.yaml |
Image Version Checks
The module checks for known incompatible versions:
| Check | Description |
|---|---|
| ChromaDB version | Versions below 0.5.0 are incompatible with NumPy 2.0 |
| PostgreSQL version | Verify compatibility with logical replication requirements |
| Spark version | Verify Spark Connect compatibility |
isolation.sh -- Tenant Isolation
Module: scripts/lib/validate/isolation.sh
Validates that tenant resources are properly isolated.
Checks
| Check | Description |
|---|---|
| Namespace isolation | Tenants cannot access other tenant namespaces |
| Network policies | NetworkPolicy rules enforce pod-to-pod isolation |
| Secret isolation | Secrets are scoped to the correct namespace |
| RBAC | ServiceAccounts have minimum required permissions |
integration.sh -- Integration Testing
Module: scripts/lib/validate/integration.sh
Runs integration tests against deployed services.
Test Suites
| Suite | Description |
|---|---|
| Health checks | Verify all service health endpoints return 200 |
| Connectivity | Test inter-service communication |
| Database | Verify database migrations have applied |
| Kafka | Verify topic creation and message flow |
pipeline.sh -- Pipeline Validation
Module: scripts/lib/validate/pipeline.sh
Validates CD pipeline configuration and state.
Functions
| Function | Description |
|---|---|
validate_pipeline_state | Check state file integrity |
validate_stage_dependencies | Verify all stage dependencies are met |
validate_stage_scripts | Ensure all referenced stage scripts exist |
Running Validations
Pre-deployment validation is triggered automatically by the CD pipeline. To run manually:
source scripts/lib/validate/pre-deploy.sh
validate_image_versions
validate_helm_valuesRelated Pages
- Core Libraries -- Configuration access
- Stage 18: Validation -- Post-deployment validation
- Port Validation -- Port drift detection tool