Skip to content

Commit f529297

Browse files
Merge pull request #130 from blacklanternsecurity/helmifying
Fix Helm CI
2 parents 41076b8 + 80c5039 commit f529297

5 files changed

Lines changed: 83 additions & 3 deletions

File tree

.github/workflows/helm-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ jobs:
8181
echo "Image tag: $IMAGE_TAG"
8282
cat helm/Chart.yaml
8383
84+
- name: Add Helm repositories
85+
run: helm repo add bitnami https://charts.bitnami.com/bitnami
86+
8487
- name: Build Helm dependencies
8588
run: helm dependency build helm/
8689

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Lint
3838
run: |
3939
uv run ruff check
40-
uv run ruff format --check
40+
uv run ruff format --diff
4141
- name: Run tests
4242
run: |
4343
NO_COLOR=true uv run pytest --reruns 2 --disable-warnings --log-cli-level=INFO --cov-report xml:cov.xml --cov=bbot_server .

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,81 @@ Note: this requires Docker and Docker Compose to be installed.
4646
bbctl server start
4747
```
4848

49+
## Deploy with Helm (Kubernetes)
50+
51+
BBOT Server can be deployed to Kubernetes using its official Helm chart. The chart deploys the API server, watchdog, MongoDB, and Redis.
52+
53+
### Quick Start
54+
55+
```bash
56+
# Add the Helm repo
57+
helm repo add blacklanternsecurity https://blacklanternsecurity.github.io/bbot-server
58+
59+
# Install
60+
helm install bbot blacklanternsecurity/bbot-server
61+
```
62+
63+
Or install directly from the OCI registry:
64+
65+
```bash
66+
helm install bbot oci://registry-1.docker.io/blacklanternsecurity/bbot-server
67+
```
68+
69+
### Configuration
70+
71+
Key values can be overridden with `--set` or a custom values file:
72+
73+
```bash
74+
helm install bbot blacklanternsecurity/bbot-server \
75+
--set ingress.enabled=true \
76+
--set ingress.hosts[0].host=bbot.example.com \
77+
--set ingress.hosts[0].paths[0].path=/ \
78+
--set ingress.hosts[0].paths[0].pathType=Prefix
79+
```
80+
81+
Or with a values file:
82+
83+
```yaml
84+
# custom-values.yaml
85+
ingress:
86+
enabled: true
87+
className: nginx
88+
annotations:
89+
cert-manager.io/cluster-issuer: letsencrypt
90+
hosts:
91+
- host: bbot.example.com
92+
paths:
93+
- path: /
94+
pathType: Prefix
95+
tls:
96+
- secretName: bbot-tls
97+
hosts:
98+
- bbot.example.com
99+
100+
secrets:
101+
# provide your own API key, or leave empty to auto-generate
102+
apiKey: ""
103+
```
104+
105+
```bash
106+
helm install bbot blacklanternsecurity/bbot-server -f custom-values.yaml
107+
```
108+
109+
### Retrieving the API Key
110+
111+
If you didn't provide an API key, one is auto-generated. Retrieve it with:
112+
113+
```bash
114+
kubectl get secret bbot-api-key -o jsonpath='{.data.api-key}' | base64 -d
115+
```
116+
117+
### Upgrading
118+
119+
```bash
120+
helm repo update
121+
helm upgrade bbot blacklanternsecurity/bbot-server
122+
```
123+
49124
## Interacting with BBOT Server Remotely (Multiplayer)
50125

51126
By default, BBOT Server listens on localhost. Use `--listen` to expose it to the network:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "bbot-server"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = ""
55
authors = [{name = "TheTechromancer"}]
66
license = "AGPL-3.0"

test_helm_deployment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ def setUpClass(cls):
216216
)
217217
print("Image loaded successfully")
218218

219-
# Update Helm dependencies
219+
# Add Helm repositories and update dependencies
220+
print("Adding Helm repositories...")
221+
cls.helm("repo", "add", "bitnami", "https://charts.bitnami.com/bitnami", timeout=30)
220222
print("Updating Helm dependencies...")
221223
cls.helm("dependency", "update", "helm/", timeout=60)
222224

0 commit comments

Comments
 (0)