-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.example.yml
More file actions
123 lines (107 loc) · 3.12 KB
/
config.example.yml
File metadata and controls
123 lines (107 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Example codeQ Configuration with Persistence Plugin
# Core settings
port: 8080
env: production
timezone: America/Sao_Paulo
logLevel: info
logFormat: json
# === Persistence Plugin Configuration ===
# Choose your persistence backend. Available options:
# - redis: Redis/KVRocks (default, production-ready)
# - memory: In-memory storage (testing only, data is lost on restart)
# Option 1: Redis Plugin (Default)
persistenceProvider: redis
persistenceConfig:
addr: localhost:6379
password: "" # optional, leave empty if no password
# Option 2: Memory Plugin (Testing Only)
# persistenceProvider: memory
# persistenceConfig: {}
# === Legacy Redis Settings (deprecated) ===
# These are still supported for backward compatibility
# If persistenceProvider is not set, these will be used automatically
redisAddr: localhost:6379
redisPassword: ""
# === Authentication ===
# Producer authentication (for task submission)
producerAuthProvider: static
producerAuthConfig:
token: "your-producer-token-here"
subject: "api-client"
# Worker authentication (for task claiming)
workerAuthProvider: static
workerAuthConfig:
token: "your-worker-token-here"
subject: "worker-1"
eventTypes: ["GENERATE_MASTER", "GENERATE_CREATIVE"]
# === Task Scheduling ===
defaultLeaseSeconds: 300
requeueInspectLimit: 200
maxAttemptsDefault: 5
# === Backoff Configuration ===
backoffPolicy: exp_full_jitter
backoffBaseSeconds: 5
backoffMaxSeconds: 900
# === Webhooks ===
webhookHmacSecret: "your-webhook-secret"
subscriptionMinIntervalSeconds: 1
subscriptionCleanupIntervalSeconds: 300
# Result webhooks
resultWebhookMaxAttempts: 5
resultWebhookBaseBackoffSeconds: 5
resultWebhookMaxBackoffSeconds: 300
# === Rate Limiting ===
rateLimit:
producer:
requestsPerMinute: 1000
burstSize: 100
worker:
requestsPerMinute: 500
burstSize: 50
webhook:
requestsPerMinute: 100
burstSize: 10
admin:
requestsPerMinute: 100
burstSize: 10
# === Sharding (Optional) ===
# Enable sharding for horizontal scaling across multiple KVRocks instances.
# When disabled or absent, codeQ operates as a single-shard deployment.
# sharding:
# enabled: true
# defaultShard: "primary"
# commandMappings:
# GENERATE_MASTER: "compute-heavy"
# GENERATE_CREATIVE: "compute-heavy"
# SEND_EMAIL: "notification"
# tenantOverrides:
# "tenant-premium-abc": "premium-shard"
# backends:
# primary:
# address: "kvrocks-primary:6379"
# password: "${REDIS_PRIMARY_PASSWORD}"
# db: 0
# poolSize: 20
# compute-heavy:
# address: "kvrocks-heavy:6379"
# password: "${REDIS_HEAVY_PASSWORD}"
# db: 0
# poolSize: 30
# notification:
# address: "kvrocks-notification:6379"
# password: "${REDIS_NOTIFICATION_PASSWORD}"
# db: 0
# poolSize: 15
# premium-shard:
# address: "kvrocks-premium:6379"
# password: "${REDIS_PREMIUM_PASSWORD}"
# db: 0
# poolSize: 25
# === Storage ===
localArtifactsDir: /tmp/codeq-artifacts
# === Tracing (Optional) ===
tracingEnabled: false
tracingServiceName: codeq
tracingOtlpEndpoint: localhost:4317
tracingOtlpInsecure: true
tracingSampleRatio: 1.0