Skip to main content

Reference

This section provides configuration schemas, environment variables, Helm values, and OpenAPI generation guides for MatrixHub developers and platform engineers.


🔌 1. Environment Variables​

Configure MatrixHub container execution or client redirection using the variables below:

Environment VariableAllowed ValuesDefault ValueDescription
MATRIXHUB_DATABASE_DSNCustom standard MySQL DSN connection string.""Connection string for external MySQL (e.g. user:pass@tcp(127.0.0.1:3306)/matrixhub?charset=utf8mb4&parseTime=true).
HF_ENDPOINTExternal HTTP registry URL address.https://huggingface.coRedirects standard AI inference engines and HF clients to cache weights inside MatrixHub.

âš™ī¸ 2. Core Configurations (config/config.yaml)​

Specify server behavior, local caching engines, and database connections. A typical development configuration is outlined below:

# MatrixHub System Configuration Schema
debug: false # Set true to print verbose database SQL logs
logLevel: "warn" # Logging granularity: debug / info / warn / error

apiServer:
port: 9527 # Listening port for backend API requests
database:
driver: "mysql" # Driver type: mysql / postgres
migrate: true # Auto trigger SQL database schema updates on boot
migrationPath: "/etc/matrixhub/migrations"
maxOpenConns: 100
maxIdleConns: 10
connMaxLifetimeSeconds: 3600

â˜¸ī¸ 3. Helm Values Reference Chart​

Customize deployment parameters when installing the official MatrixHub Kubernetes chart:

Value KeyParameter DescriptionDefault Value
apiserver.replicaCountNumber of running apiserver pod replicas.1
apiserver.image.registryTarget registry to pull the apiserver container.ghcr.io
apiserver.image.repositoryRepository name inside the registry.matrixhub-ai/matrixhub
apiserver.service.typeKubernetes service type: ClusterIP, NodePort, or LoadBalancer.ClusterIP
apiserver.service.nodePortStatic external port assigned to each node (type NodePort).30001
apiserver.resources.limitsHard resource limitations allowed for the API server pod.{cpu: 500m, memory: 512Mi}
global.storage.apiserver.builtInUses the built-in chart-managed MySQL instance.true
mysql.persistence.sizePVC disk capacity requested for the built-in database state.8Gi

đŸ› ī¸ 4. Generate OpenAPI Clients​

If the Swagger schema parameters are changed during API server updates, you can easily regenerate the corresponding testing client SDK:

# Clean and compile standard swagger schema definitions
make gen_openapi_sdk

The SDK files will be compiled and output to the ./test/client/ directory.