MATIH Platform is in active MVP development. Documentation reflects current implementation status.
18. CI/CD & Build System
Scripts Library
Validation Libraries

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

FunctionDescription
validate_image_versionsCheck Docker image versions for known incompatibilities
validate_helm_valuesEnsure Helm values files are consistent
validate_secrets_referencesVerify all secretKeyRef references exist
validate_port_consistencyCheck ports match components.yaml

Image Version Checks

The module checks for known incompatible versions:

CheckDescription
ChromaDB versionVersions below 0.5.0 are incompatible with NumPy 2.0
PostgreSQL versionVerify compatibility with logical replication requirements
Spark versionVerify Spark Connect compatibility

isolation.sh -- Tenant Isolation

Module: scripts/lib/validate/isolation.sh

Validates that tenant resources are properly isolated.

Checks

CheckDescription
Namespace isolationTenants cannot access other tenant namespaces
Network policiesNetworkPolicy rules enforce pod-to-pod isolation
Secret isolationSecrets are scoped to the correct namespace
RBACServiceAccounts have minimum required permissions

integration.sh -- Integration Testing

Module: scripts/lib/validate/integration.sh

Runs integration tests against deployed services.

Test Suites

SuiteDescription
Health checksVerify all service health endpoints return 200
ConnectivityTest inter-service communication
DatabaseVerify database migrations have applied
KafkaVerify topic creation and message flow

pipeline.sh -- Pipeline Validation

Module: scripts/lib/validate/pipeline.sh

Validates CD pipeline configuration and state.

Functions

FunctionDescription
validate_pipeline_stateCheck state file integrity
validate_stage_dependenciesVerify all stage dependencies are met
validate_stage_scriptsEnsure 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_values

Related Pages