Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/arec1b0_kubesentiment.json
T

1 line
29 KiB
JSON

{"repo": "arec1b0/kubesentiment", "files": {"docs/configuration/ENVIRONMENT_VARIABLES.md": {"88cfbb1b3ba5f2efb06023dd100368d37c6ef1b6": {"t": 1785596436.1812658, "n": 28479, "h": "9bb7deb60670089e", "c": "# Environment Variables Reference\n\nComplete reference of all KubeSentiment configuration settings.\n\n**Quick Links:** [Server](#server) | [Model](#model) | [Security](#security) | [Performance](#performance) | [Kafka](#kafka) | [Redis](#redis) | [Vault](#vault) | [Data Lake](#data-lake) | [Monitoring](#monitoring) | [MLOps](#mlops)\n\nAll variables use the `MLOPS_` prefix and can be set via environment variables, `.env` files, or Kubernetes ConfigMaps.\n\n---\n\n## Server Configuration\n\nServer and application settings.\n\n| Variable | Type | Default | Min/Max | Profile Defaults | Description |\n| ------------------- | ---- | ---------------------- | ---------------------- | -------------------------------------- | ---------------------------------------------- |\n| `MLOPS_APP_NAME` | str | \"ML Model Serving API\" | - | local/dev/staging/prod | Application name displayed in UI/logs |\n| `MLOPS_APP_VERSION` | str | \"1.0.0\" | - | - | Semantic version (e.g., \"1.2.3\") |\n| `MLOPS_DEBUG` | bool | false | - | local/dev: true<br>staging/prod: false | Enable debug mode (verbose output, hot-reload) |\n| `MLOPS_ENVIRONMENT` | str | \"development\" | local/dev/staging/prod | Set by profile | Environment name (use `MLOPS_PROFILE` instead) |\n| `MLOPS_HOST` | str | \"0.0.0.0\" | - | local: 127.0.0.1<br>others: 0.0.0.0 | Server bind address |\n| `MLOPS_PORT` | int | 8000 | 1024-65535 | - | Server port |\n| `MLOPS_WORKERS` | int | 1 | 1-16 | local/dev: 1<br>staging: 2<br>prod: 4 | Number of worker processes |\n| `MLOPS_PROFILE` | str | \"development\" | local/dev/staging/prod | - | Configuration profile (sets many defaults) |\n\n**Examples:**\n\n```bash\nexport MLOPS_PROFILE=production # Sets 50+ defaults\nexport MLOPS_HOST=0.0.0.0\nexport MLOPS_PORT=8000\nexport MLOPS_WORKERS=4\n```\n\n---\n\n## Model Configuration\n\nMachine learning model settings.\n\n| Variable | Type | Default | Min/Max | Description |\n| ---------------------------------- | ---- | ------------------------------------------------- | ----------------- | ---------------------------------------------------------- |\n| `MLOPS_MODEL_NAME` | str | \"distilbert-base-uncased-finetuned-sst-2-english\" | - | HuggingFace model identifier |\n| `MLOPS_ALLOWED_MODELS` | str | comma-separated | - | Whitelist of allowed models (security) |\n| `MLOPS_MODEL_CACHE_DIR` | str | \"./models\" | - | Directory to cache downloaded models |\n| `MLOPS_ONNX_MODEL_PATH` | str | optional | - | Path to ONNX model directory |\n| `MLOPS_ONNX_MODEL_PATH_DEFAULT` | str | \"./models/onnx\" | - | Default ONNX path fallback |\n| `MLOPS_MAX_TEXT_LENGTH` | int | 512 | 1-10000 | Maximum input text length (characters) |\n| `MLOPS_PREDICTION_CACHE_MAX_SIZE` | int | 1000 | 10-100000 | LRU cache size for predictions |\n| `MLOPS_PREDICTION_CACHE_ENABLED` | bool | true | - | Enable LRU cache for predictions (disable if hit rate <5%) |\n| `MLOPS_ENABLE_FEATURE_ENGINEERING` | bool | false | - | Enable advanced feature engineering |\n| `MLOPS_MODEL_BACKEND` | str | \"onnx\" | onnx/pytorch/mock | Model inference backend |\n\n**Validation Rules:**\n\n- Model name must match: `[a-zA-Z0-9/_\\-]+`\n- Model must be in `MLOPS_ALLOWED_MODELS` list\n- Cache directory must be absolute path\n\n**Examples:**\n\n```bash\nexport MLOPS_MODEL_NAME=distilbert-base-uncased-finetuned-sst-2-english\nexport MLOPS_MAX_TEXT_LENGTH=512\nexport MLOPS_PREDICTION_CACHE_MAX_SIZE=1000\nexport MLOPS_PREDICTION_CACHE_ENABLED=true # Set to false if cache hit rate <5%\nexport MLOPS_MODEL_BACKEND=onnx\n```\n\n---\n\n## Security Configuration\n\nAuthentication and CORS settings.\n\n| Variable | Type | Default | Min/Max | Description |\n| --------------------------- | ---- | ------- | -------- | ---------------------------------------------------- |\n| `MLOPS_API_KEY` | str | \"\" | 8+ chars | API key for authentication (min 8 characters) |\n| `MLOPS_ALLOWED_ORIGINS` | str | \"\\*\" | - | CORS allowed origins (comma-separated, no wildcards) |\n| `MLOPS_MAX_REQUEST_TIMEOUT` | int | 300 | 1-300 | Request timeout in seconds |\n\n**Validation Rules:**\n\n- API key: minimum 8 characters if provided\n- CORS origins: must be valid URLs (https://... or http://...)\n- Wildcard origins blocked for security in production\n\n**Environment-Specific Defaults:**\n\n- **Development:** MLOPS_API_KEY=\"\" (disabled)\n- **Production:** MLOPS_API_KEY required\n\n**Examples:**\n\n```bash\nexport MLOPS_API_KEY=my-secure-api-key-12345\nexport MLOPS_ALLOWED_ORIGINS=https://app.example.com,https://admin.example.com\nexport MLOPS_MAX_REQUEST_TIMEOUT=300\n```\n\n---\n\n## Performance Configuration\n\nAsync processing and performance tuning.\n\n### Async Batch Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| -------------------------------------------- | ---- | ------- | --------- | ----------------------------- |\n| `MLOPS_ASYNC_BATCH_ENABLED` | bool | false | - | Enable async batch processing |\n| `MLOPS_ASYNC_BATCH_MAX_JOBS` | int | 1000 | 10-10000 | Maximum concurrent jobs |\n| `MLOPS_ASYNC_BATCH_MAX_BATCH_SIZE` | int | 100 | 10-10000 | Maximum batch size |\n| `MLOPS_ASYNC_BATCH_DEFAULT_TIMEOUT_SECONDS` | int | 300 | 30-3600 | Job timeout (seconds) |\n| `MLOPS_ASYNC_BATCH_PRIORITY_HIGH_LIMIT` | int | 200 | - | High priority queue size |\n| `MLOPS_ASYNC_BATCH_PRIORITY_MEDIUM_LIMIT` | int | 300 | - | Medium priority queue size |\n| `MLOPS_ASYNC_BATCH_PRIORITY_LOW_LIMIT` | int | 500 | - | Low priority queue size |\n| `MLOPS_ASYNC_BATCH_CLEANUP_INTERVAL_SECONDS` | int | 300 | 10-3600 | Cleanup interval |\n| `MLOPS_ASYNC_BATCH_CACHE_TTL_SECONDS` | int | 3600 | 300-86400 | Result cache TTL |\n| `MLOPS_ASYNC_BATCH_RESULT_CACHE_MAX_SIZE` | int | 1000 | 100-10000 | Result cache size |\n\n### Anomaly Buffer Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| --------------------------------------- | ---- | ------- | ---------- | ------------------------------- |\n| `MLOPS_ANOMALY_BUFFER_ENABLED` | bool | false | - | Enable anomaly detection buffer |\n| `MLOPS_ANOMALY_BUFFER_MAX_SIZE` | int | 1000 | 100-100000 | Max anomalies to store |\n| `MLOPS_ANOMALY_BUFFER_DEFAULT_TTL` | int | 3600 | 300-86400 | TTL for anomalies |\n| `MLOPS_ANOMALY_BUFFER_CLEANUP_INTERVAL` | int | 300 | 60-3600 | Cleanup interval |\n\n**Examples:**\n\n```bash\nexport MLOPS_ASYNC_BATCH_ENABLED=true\nexport MLOPS_ASYNC_BATCH_MAX_JOBS=1000\nexport MLOPS_ASYNC_BATCH_MAX_BATCH_SIZE=100\nexport MLOPS_ASYNC_BATCH_DEFAULT_TIMEOUT_SECONDS=300\n```\n\n---\n\n## Kafka Configuration\n\nMessage streaming and async processing (30+ settings).\n\n### Basic Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------- | ---- | -------------------- | ------- | ------------------------------- |\n| `MLOPS_KAFKA_ENABLED` | bool | false | - | Enable Kafka streaming |\n| `MLOPS_KAFKA_BOOTSTRAP_SERVERS` | str | \"localhost:9092\" | - | Kafka brokers (comma-separated) |\n| `MLOPS_KAFKA_CONSUMER_GROUP` | str | \"mlops-sentiment\" | - | Consumer group ID |\n| `MLOPS_KAFKA_TOPIC` | str | \"sentiment-requests\" | - | Topic to consume from |\n\n### Consumer Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------------- | ---- | ---------- | -------------------- | ------------------------- |\n| `MLOPS_KAFKA_AUTO_OFFSET_RESET` | str | \"earliest\" | earliest/latest/none | Offset reset strategy |\n| `MLOPS_KAFKA_MAX_POLL_RECORDS` | int | 500 | 1-10000 | Records per poll |\n| `MLOPS_KAFKA_SESSION_TIMEOUT_MS` | int | 30000 | 1000-300000 | Session timeout (ms) |\n| `MLOPS_KAFKA_HEARTBEAT_INTERVAL_MS` | int | 10000 | 1000-30000 | Heartbeat interval (ms) |\n| `MLOPS_KAFKA_MAX_POLL_INTERVAL_MS` | int | 300000 | 10000-2147483647 | Max poll interval (ms) |\n| `MLOPS_KAFKA_ENABLE_AUTO_COMMIT` | bool | true | - | Auto commit flag |\n| `MLOPS_KAFKA_AUTO_COMMIT_INTERVAL_MS` | int | 5000 | 1000-60000 | Auto commit interval (ms) |\n\n### High-Throughput Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| ----------------------------------- | ---- | ------- | ----------- | ------------------------- |\n| `MLOPS_KAFKA_CONSUMER_THREADS` | int | 1 | 1-32 | Parallel consumer threads |\n| `MLOPS_KAFKA_BATCH_SIZE` | int | 10 | 1-1000 | Batch processing size |\n| `MLOPS_KAFKA_PROCESSING_TIMEOUT_MS` | int | 5000 | 1000-300000 | Batch timeout (ms) |\n| `MLOPS_KAFKA_BUFFER_SIZE` | int | 10000 | 1000-100000 | Message queue buffer |\n\n### Dead Letter Queue\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------- | ---- | --------------- | ------- | ----------------------- |\n| `MLOPS_KAFKA_DLQ_TOPIC` | str | \"sentiment-dlq\" | - | Dead letter queue topic |\n| `MLOPS_KAFKA_DLQ_ENABLED` | bool | false | - | Enable DLQ |\n| `MLOPS_KAFKA_MAX_RETRIES` | int | 3 | 1-10 | Max retries before DLQ |\n\n### Producer Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| ---------------------------------------- | ---- | -------- | ------------------------- | ------------------------------- |\n| `MLOPS_KAFKA_PRODUCER_BOOTSTRAP_SERVERS` | str | \"\" | - | Producer brokers (if different) |\n| `MLOPS_KAFKA_PRODUCER_ACKS` | str | \"all\" | 0/1/all | Acknowledgment level |\n| `MLOPS_KAFKA_PRODUCER_RETRIES` | int | 3 | 0-10 | Producer retry count |\n| `MLOPS_KAFKA_PRODUCER_BATCH_SIZE` | int | 16384 | 0-1048576 | Batch size (bytes) |\n| `MLOPS_KAFKA_PRODUCER_LINGER_MS` | int | 10 | 0-100 | Linger time (ms) |\n| `MLOPS_KAFKA_PRODUCER_COMPRESSION_TYPE` | str | \"snappy\" | none/gzip/snappy/lz4/zstd | Compression |\n\n### Advanced\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------------------- | ---- | ------- | ----------------------- | ------------------- |\n| `MLOPS_KAFKA_PARTITION_ASSIGNMENT_STRATEGY` | str | \"range\" | range/roundrobin/sticky | Assignment strategy |\n\n**Examples:**\n\n```bash\nexport MLOPS_KAFKA_ENABLED=true\nexport MLOPS_KAFKA_BOOTSTRAP_SERVERS=kafka1:9092,kafka2:9092\nexport MLOPS_KAFKA_CONSUMER_GROUP=my-group\nexport MLOPS_KAFKA_TOPIC=sentiment-requests\nexport MLOPS_KAFKA_CONSUMER_THREADS=8\n```\n\n---\n\n## Redis Configuration\n\nDistributed caching.\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------------ | ---- | ----------- | -------- | ------------------------------ |\n| `MLOPS_REDIS_ENABLED` | bool | false | - | Enable Redis caching |\n| `MLOPS_REDIS_HOST` | str | \"localhost\" | - | Redis server host |\n| `MLOPS_REDIS_PORT` | int | 6379 | 1-65535 | Redis server port |\n| `MLOPS_REDIS_DB` | int | 0 | 0-15 | Database number |\n| `MLOPS_REDIS_PASSWORD` | str | \"\" | - | Authentication password |\n| `MLOPS_REDIS_MAX_CONNECTIONS` | int | 50 | 10-1000 | Connection pool size |\n| `MLOPS_REDIS_SOCKET_TIMEOUT` | int | 5 | 1-60 | Socket timeout (seconds) |\n| `MLOPS_REDIS_SOCKET_CONNECT_TIMEOUT` | int | 5 | 1-60 | Connection timeout (seconds) |\n| `MLOPS_REDIS_NAMESPACE` | str | \"mlops\" | - | Key prefix namespace |\n| `MLOPS_REDIS_PREDICTION_CACHE_TTL` | int | 3600 | 60-86400 | Prediction cache TTL (seconds) |\n| `MLOPS_REDIS_FEATURE_CACHE_TTL` | int | 1800 | 60-86400 | Feature cache TTL (seconds) |\n\n**Profile Defaults:**\n\n- **Local/Dev:** Disabled\n- **Staging/Prod:** Enabled\n\n**Examples:**\n\n```bash\nexport MLOPS_REDIS_ENABLED=true\nexport MLOPS_REDIS_HOST=redis.example.com\nexport MLOPS_REDIS_PORT=6379\nexport MLOPS_REDIS_PASSWORD=my-password\nexport MLOPS_REDIS_MAX_CONNECTIONS=100\n```\n\n---\n\n## Vault Configuration\n\nHashiCorp Vault secrets management.\n\n| Variable | Type | Default | Min/Max | Description |\n| -------------------------- | ---- | ------------------- | ------- | -------------------------------------- |\n| `MLOPS_VAULT_ENABLED` | bool | false | - | Enable Vault integration |\n| `MLOPS_VAULT_ADDR` | str | \"http://vault:8200\" | - | Vault server address |\n| `MLOPS_VAULT_NAMESPACE` | str | \"\" | - | Vault namespace (Enterprise) |\n| `MLOPS_VAULT_ROLE` | str | \"mlops-sentiment\" | - | Kubernetes service account role |\n| `MLOPS_VAULT_MOUNT_POINT` | str | \"secret\" | - | KV v2 secrets engine mount |\n| `MLOPS_VAULT_SECRETS_PATH` | str | \"mlops-sentiment\" | - | Base secrets path |\n| `MLOPS_VAULT_TOKEN` | str | \"\" | - | Direct auth token (not for production) |\n\n**Profile Defaults:**\n\n- **Local/Dev:** Disabled\n- **Staging/Prod:** Enabled\n\n**Examples:**\n\n```bash\nexport MLOPS_VAULT_ENABLED=true\nexport MLOPS_VAULT_ADDR=https://vault.example.com\nexport MLOPS_VAULT_ROLE=mlops-sentiment-prod\n```\n\n---\n\n## Data Lake Configuration\n\nCloud storage integration (AWS/GCP/Azure).\n\n### Core Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| --------------------------------------- | ---- | ------------- | ------------------------- | --------------------- |\n| `MLOPS_DATA_LAKE_ENABLED` | bool | false | - | Enable data lake |\n| `MLOPS_DATA_LAKE_PROVIDER` | str | \"s3\" | s3/gcs/azure | Cloud provider |\n| `MLOPS_DATA_LAKE_BUCKET` | str | \"\" | - | Bucket/container name |\n| `MLOPS_DATA_LAKE_PREFIX` | str | \"predictions\" | - | Path prefix |\n| `MLOPS_DATA_LAKE_BATCH_SIZE` | int | 100 | 1-1000 | Predictions per batch |\n| `MLOPS_DATA_LAKE_BATCH_TIMEOUT_SECONDS` | int | 60 | 5-300 | Flush timeout |\n| `MLOPS_DATA_LAKE_COMPRESSION` | str | \"snappy\" | snappy/gzip/lz4/zstd/none | Compression format |\n| `MLOPS_DATA_LAKE_PARTITION_BY` | str | \"date\" | date/hour/model | Partition strategy |\n\n### AWS S3\n\n| Variable | Type | Default | Min/Max | Description |\n| --------------------------------- | ---- | ----------- | ------- | ---------------------------------- |\n| `MLOPS_DATA_LAKE_S3_REGION` | str | \"us-east-1\" | - | AWS region |\n| `MLOPS_DATA_LAKE_S3_ENDPOINT_URL` | str | \"\" | - | Custom S3 endpoint (S3-compatible) |\n\n### GCP\n\n| Variable | Type | Default | Min/Max | Description |\n| -------------------------------------- | ---- | ------- | ------- | ------------------------- |\n| `MLOPS_DATA_LAKE_GCS_PROJECT` | str | \"\" | - | GCP project ID |\n| `MLOPS_DATA_LAKE_GCS_CREDENTIALS_PATH` | str | \"\" | - | Service account JSON path |\n\n### Azure\n\n| Variable | Type | Default | Min/Max | Description |\n| ----------------------------------------- | ---- | ------- | ------- | -------------------- |\n| `MLOPS_DATA_LAKE_AZURE_ACCOUNT_NAME` | str | \"\" | - | Storage account name |\n| `MLOPS_DATA_LAKE_AZURE_ACCOUNT_KEY` | str | \"\" | - | Account key |\n| `MLOPS_DATA_LAKE_AZURE_CONNECTION_STRING` | str | \"\" | - | Connection string |\n\n### Query Engines\n\n| Variable | Type | Default | Min/Max | Description |\n| --------------------------------- | ---- | ------- | ------- | --------------------------- |\n| `MLOPS_DATA_LAKE_ENABLE_ATHENA` | bool | false | - | AWS Athena compatibility |\n| `MLOPS_DATA_LAKE_ENABLE_BIGQUERY` | bool | false | - | BigQuery compatibility |\n| `MLOPS_DATA_LAKE_ENABLE_SYNAPSE` | bool | false | - | Azure Synapse compatibility |\n\n**Examples:**\n\n```bash\n# AWS S3\nexport MLOPS_DATA_LAKE_ENABLED=true\nexport MLOPS_DATA_LAKE_PROVIDER=s3\nexport MLOPS_DATA_LAKE_BUCKET=my-predictions\nexport MLOPS_DATA_LAKE_S3_REGION=us-west-2\n\n# GCP\nexport MLOPS_DATA_LAKE_PROVIDER=gcs\nexport MLOPS_DATA_LAKE_GCS_PROJECT=my-project\n```\n\n---\n\n## Monitoring Configuration\n\nMetrics, logging, and distributed tracing.\n\n### Basic Settings\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------- | ---- | ------- | --------------------------------- | --------------------------- |\n| `MLOPS_ENABLE_METRICS` | bool | true | - | Enable Prometheus metrics |\n| `MLOPS_LOG_LEVEL` | str | \"INFO\" | DEBUG/INFO/WARNING/ERROR/CRITICAL | Log verbosity |\n| `MLOPS_METRICS_CACHE_TTL` | int | 60 | 1-300 | Metrics cache TTL (seconds) |\n\n### Advanced Metrics\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------------------ | ----- | ------- | ------- | ------------------------- |\n| `MLOPS_ADVANCED_METRICS_ENABLED` | bool | false | - | Enable advanced KPIs |\n| `MLOPS_ADVANCED_METRICS_DETAILED_TRACKING` | bool | false | - | Per-prediction tracking |\n| `MLOPS_ADVANCED_METRICS_HISTORY_HOURS` | int | 24 | 1-168 | History retention (hours) |\n| `MLOPS_ADVANCED_METRICS_COST_PER_1K` | float | 0.0 | - | Cost per 1k predictions |\n\n### Tracing\n\n| Variable | Type | Default | Min/Max | Description |\n| ----------------------- | ---- | ----------------- | -------------------------- | -------------------------- |\n| `MLOPS_ENABLE_TRACING` | bool | false | - | Enable distributed tracing |\n| `MLOPS_TRACING_BACKEND` | str | \"jaeger\" | jaeger/zipkin/otlp/console | Tracing backend |\n| `MLOPS_SERVICE_NAME` | str | \"mlops-sentiment\" | - | Service name for traces |\n\n### Jaeger\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------- | ---- | ----------- | ---------- | --------------------- |\n| `MLOPS_JAEGER_AGENT_HOST` | str | \"localhost\" | - | Jaeger agent hostname |\n| `MLOPS_JAEGER_AGENT_PORT` | int | 6831 | 1024-65535 | Jaeger agent port |\n\n### Zipkin\n\n| Variable | Type | Default | Min/Max | Description |\n| ----------------------- | ---- | ----------------------- | ------- | ------------------------- |\n| `MLOPS_ZIPKIN_ENDPOINT` | str | \"http://localhost:9411\" | - | Zipkin collector endpoint |\n\n### OTLP\n\n| Variable | Type | Default | Min/Max | Description |\n| --------------------- | ---- | ---------------- | ------- | --------------------------- |\n| `MLOPS_OTLP_ENDPOINT` | str | \"localhost:4317\" | - | OpenTelemetry gRPC endpoint |\n\n### Exclusions\n\n| Variable | Type | Default | Min/Max | Description |\n| ----------------------------- | ---- | ------------------ | ------- | ------------------------------------ |\n| `MLOPS_TRACING_EXCLUDED_URLS` | str | \"/health,/metrics\" | - | Comma-separated URLs to skip tracing |\n\n**Examples:**\n\n```bash\nexport MLOPS_ENABLE_METRICS=true\nexport MLOPS_LOG_LEVEL=INFO\nexport MLOPS_ENABLE_TRACING=true\nexport MLOPS_TRACING_BACKEND=jaeger\nexport MLOPS_JAEGER_AGENT_HOST=jaeger.example.com\n```\n\n---\n\n## MLOps Configuration\n\nModel lifecycle management.\n\n### MLflow\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------ | ---- | -------------------- | ------- | ----------------------------------- |\n| `MLOPS_MLFLOW_ENABLED` | bool | false | - | Enable MLflow registry |\n| `MLOPS_MLFLOW_TRACKING_URI` | str | \"http://mlflow:5000\" | - | Tracking server URI |\n| `MLOPS_MLFLOW_REGISTRY_URI` | str | \"\" | - | Registry URI (defaults to tracking) |\n| `MLOPS_MLFLOW_EXPERIMENT_NAME` | str | \"default\" | - | Experiment name |\n| `MLOPS_MLFLOW_MODEL_NAME` | str | \"sentiment\" | - | Registered model name |\n\n### Drift Detection\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------- | ----- | ------- | --------- | ------------------------------------- |\n| `MLOPS_DRIFT_DETECTION_ENABLED` | bool | false | - | Enable drift detection |\n| `MLOPS_DRIFT_WINDOW_SIZE` | int | 1000 | 100-10000 | Sample window size |\n| `MLOPS_DRIFT_PSI_THRESHOLD` | float | 0.25 | 0.0-1.0 | PSI threshold (0.1=minor, 0.25=major) |\n| `MLOPS_DRIFT_KS_THRESHOLD` | float | 0.05 | 0.0-1.0 | KS test p-value |\n| `MLOPS_DRIFT_MIN_SAMPLES` | int | 100 | 10-1000 | Min samples before check |\n\n### Explainability\n\n| Variable | Type | Default | Min/Max | Description |\n| ------------------------------------ | ---- | ------- | ------- | ---------------------- |\n| `MLOPS_EXPLAINABILITY_ENABLED` | bool | false | - | Enable explainability |\n| `MLOPS_EXPLAINABILITY_USE_ATTENTION` | bool | true | - | Use attention weights |\n| `MLOPS_EXPLAINABILITY_USE_GRADIENTS` | bool | false | - | Use gradients (slower) |\n\n### Shadow Mode (Dark Launch)\n\nShadow mode enables running a candidate model alongside the production model for risk-free validation on live traffic.\n\n| Variable | Type | Default | Min/Max | Description |\n| --------------------------------- | ----- | --------- | ------------ | --------------------------------------------- |\n| `MLOPS_SHADOW_MODE_ENABLED` | bool | false | - | Enable shadow mode |\n| `MLOPS_SHADOW_MODEL_NAME` | str | \"\" | - | HuggingFace model identifier for shadow model |\n| `MLOPS_SHADOW_MODEL_BACKEND` | str | \"pytorch\" | pytorch/onnx | Backend for shadow model |\n| `MLOPS_SHADOW_TRAFFIC_PERCENTAGE` | float | 10.0 | 0-100 | Percentage of traffic to shadow |\n| `MLOPS_SHADOW_ASYNC_DISPATCH` | bool | true | - | Dispatch shadow predictions asynchronously |\n| `MLOPS_SHADOW_LOG_COMPARISONS` | bool | true | - | Log comparison results between models |\n\n**Use Cases:**\n\n- **A/B Testing:** Compare accuracy of new model versions\n- **Regression Detection:** Identify edge cases before rollout\n- **Performance Benchmarking:** Compare latency between model versions\n\n**Examples:**\n\n```bash\nexport MLOPS_MLFLOW_ENABLED=true\nexport MLOPS_MLFLOW_TRACKING_URI=http://mlflow:5000\nexport MLOPS_DRIFT_DETECTION_ENABLED=true\nexport MLOPS_EXPLAINABILITY_ENABLED=true\n\n# Shadow Mode for new model validation\nexport MLOPS_SHADOW_MODE_ENABLED=true\nexport MLOPS_SHADOW_MODEL_NAME=my-new-model-v2\nexport MLOPS_SHADOW_TRAFFIC_PERCENTAGE=20.0\n```\n\n---\n\n## Setting Variables\n\n### Method 1: Environment Variables\n\n```bash\nexport MLOPS_PROFILE=production\nexport MLOPS_REDIS_ENABLED=true\npython -m uvicorn app.main:app\n```\n\n### Method 2: .env File\n\nCreate a `.env` file:\n\n```bash\nMLOPS_PROFILE=production\nMLOPS_REDIS_ENABLED=true\nMLOPS_REDIS_HOST=redis.example.com\n```\n\nThen load it:\n\n```bash\nexport $(cat .env | xargs)\n```\n\n### Method 3: Kubernetes ConfigMap\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: mlops-sentiment-config\ndata:\n MLOPS_PROFILE: \"production\"\n MLOPS_REDIS_HOST: \"redis-prod\"\n```\n\n### Method 4: Docker\n\n```bash\ndocker run -e MLOPS_PROFILE=production \\\n -e MLOPS_REDIS_HOST=redis \\\n kubesentiment:latest\n```\n\n---\n\n## Default Values by Profile\n\n| Setting | Local | Dev | Staging | Prod |\n| -------------------- | ----- | ----- | ------- | ------- |\n| MLOPS_DEBUG | true | true | false | false |\n| MLOPS_LOG_LEVEL | INFO | DEBUG | INFO | WARNING |\n| MLOPS_WORKERS | 1 | 1 | 2 | 4 |\n| MLOPS_REDIS_ENABLED | false | false | true | true |\n| MLOPS_KAFKA_ENABLED | false | false | false | true |\n| MLOPS_VAULT_ENABLED | false | false | true | true |\n| MLOPS_MLFLOW_ENABLED | false | false | true | true |\n| MLOPS_ENABLE_METRICS | false | true | true | true |\n| MLOPS_ENABLE_TRACING | false | false | true | true |\n\nSee **[Profiles](PROFILES.md)** for complete defaults for each profile.\n\n---\n\n## Related Documentation\n\n- **[Quick Start](QUICK_START.md)** - 5-minute setup guide\n- **[Profiles](PROFILES.md)** - Profile defaults and overrides\n- **[Architecture](ARCHITECTURE.md)** - Configuration design\n- **[Deployment](DEPLOYMENT.md)** - Environment-specific configurations\n\n---\n\n**Last Updated:** 2025-11-25\n**Maintained By:** KubeSentiment Team\n"}}}}