You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
helm template test charts/bunkerweb/ -f examples/all-in-one.yaml
30
+
31
+
# Render with value overrides (useful for testing specific template paths)
32
+
helm template test charts/bunkerweb/ --set bunkerweb.kind=DaemonSet
33
+
helm template test charts/bunkerweb/ --set bunkerweb.kind=StatefulSet
34
+
helm template test charts/bunkerweb/ --set bunkerweb.hpa.enabled=true
35
+
helm template test charts/bunkerweb/ --set controller.enabled=true
36
+
37
+
# Generate documentation from values.yaml
38
+
python3 scripts/generate-docs.py
39
+
```
40
+
41
+
## Architecture
42
+
43
+
BunkerWeb deploys as a multi-component system:
44
+
45
+
-**BunkerWeb** (`bunkerweb-*.yaml`) — the core WAF/reverse proxy. Supports three deployment kinds: Deployment (default), DaemonSet, or StatefulSet. Has both an external service (user traffic) and internal service (inter-component communication).
46
+
-**Scheduler** (`scheduler-deployment.yaml`) — manages configuration distribution and coordination across BunkerWeb instances.
47
+
-**Controller** (`controller-deployment.yaml`) — watches Kubernetes Ingress and Gateway API resources, translates them to BunkerWeb config. Optional, enabled via `controller.enabled`.
48
+
-**UI** (`ui-*.yaml`) — web management interface with syslog sidecar for log collection. Optional, enabled via `ui.enabled`.
49
+
-**API** (`api-*.yaml`) — external REST API. Optional, enabled via `api.enabled`.
50
+
-**MariaDB/Redis/Prometheus/Grafana** — optional infrastructure components, each with their own deployment + service + PVC templates.
-`bunkerweb.databaseUri` — builds the database connection string dynamically (internal MariaDB vs external)
56
+
-`bunkerweb.featureEnvs` — generates environment variables from the large `scheduler.features` section in values.yaml. This is the most complex helper and maps feature config to BunkerWeb env vars.
57
+
-`bunkerweb.redisEnv` — generates Redis connection env vars with auth support
58
+
-`bunkerweb.syslogAddress` — resolves syslog address for UI log forwarding
59
+
60
+
**Conditional rendering**: Most components are gated by `.Values.<component>.enabled`. BunkerWeb kind selection uses three separate template files (`bunkerweb-deployment.yaml`, `bunkerweb-daemonset.yaml`, `bunkerweb-statefulset.yaml`) each guarded by `if eq .Values.bunkerweb.kind "<Kind>"`.
61
+
62
+
**Secret management**: The chart supports an `existingSecret` pattern — users reference a pre-created Kubernetes Secret rather than putting credentials in values.yaml. Sensitive values (DB URI, Redis password, admin creds, API keys) are injected via `secretKeyRef`.
63
+
64
+
## Values Structure
65
+
66
+
`values.yaml` (1,521 lines) has these major sections:
|**API**| External REST API for automation | Enabled |
60
+
|**MCP**| Model Context Protocol server for AI assistants | Enabled |
58
61
|**MariaDB**| Database backend | Enabled |
59
62
|**Redis**| Caching and persistence | Enabled |
60
63
|**Prometheus**| Metrics collection | Disabled |
@@ -109,6 +112,36 @@ service:
109
112
externalTrafficPolicy: Local
110
113
```
111
114
115
+
### MCP Server (AI Assistant Integration)
116
+
117
+
The MCP (Model Context Protocol) server enables AI assistants like Claude Code to manage BunkerWeb configuration.
118
+
119
+
```yaml
120
+
mcp:
121
+
enabled: true
122
+
# API credentials (must match settings.api configuration)
123
+
secrets:
124
+
bunkerwebApiToken: "your-api-token"
125
+
126
+
# Expose via Ingress (legacy)
127
+
ingress:
128
+
enabled: true
129
+
serverName: "mcp.example.com"
130
+
annotations:
131
+
bunkerweb.io/USE_WHITELIST: "yes"
132
+
bunkerweb.io/WHITELIST_IP: "YOUR_IP/32"
133
+
134
+
# Or expose via Gateway API (modern)
135
+
httpRoutes:
136
+
enabled: true
137
+
serverName: "mcp.example.com"
138
+
extraAnnotations:
139
+
bunkerweb.io/USE_WHITELIST: "yes"
140
+
bunkerweb.io/WHITELIST_IP: "YOUR_IP/32"
141
+
```
142
+
143
+
> **Security Warning**: The MCP server has no built-in authentication for the `/mcp` endpoint. Always use IP whitelisting or network policies to restrict access.
144
+
112
145
### Secret Management
113
146
114
147
```yaml
@@ -186,6 +219,7 @@ The chart includes pre-configured Grafana dashboards for:
186
219
3. **Network Policies**: Enable network policies for production environments
187
220
4. **Resource Limits**: Set appropriate CPU/memory limits
188
221
5. **Pod Security**: Review and adjust security contexts
222
+
6. **MCP Access Control**: Always configure IP whitelisting when exposing the MCP server
0 commit comments