Skip to content

Commit ace466e

Browse files
authored
feat: add nats (#8)
1 parent 064d243 commit ace466e

3 files changed

Lines changed: 57 additions & 32 deletions

File tree

README.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -105,38 +105,6 @@ maven {
105105
|---------|-------------|
106106
| `make port-forward` | Port forward services to localhost |
107107

108-
## 🌐 Service Access
109-
110-
### PostgreSQL Database
111-
- **Namespace**: `databases`
112-
- **Credentials**: `app/app`
113-
- **Database**: `app`
114-
- **Port**: `5432`
115-
116-
```bash
117-
# Port forward to access locally
118-
kubectl port-forward -n databases svc/postgresql 5432:5432
119-
```
120-
121-
### Agones Game Server Platform
122-
- **Namespace**: `games`
123-
- **CRDs**: `fleets.agones.dev`, `gameservers.agones.dev`
124-
125-
```bash
126-
# Check Agones status
127-
kubectl get fleets -n games
128-
kubectl get gameservers -n games
129-
```
130-
131-
### Dummy HTTP Server (Testing)
132-
- **URL**: http://localhost/demo
133-
- **Namespace**: `infra`
134-
135-
```bash
136-
# Test the server
137-
curl http://localhost/demo
138-
```
139-
140108
## 🐛 Quick Troubleshooting
141109

142110
```bash

helmfile.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ repositories:
44
url: https://charts.bitnami.com/bitnami
55
- name: agones
66
url: https://agones.dev/chart/stable
7+
- name: nats
8+
url: https://nats-io.github.io/k8s/helm/charts
79

810
# Helm releases in deployment order
911
releases:
@@ -39,3 +41,13 @@ releases:
3941
wait: true
4042
timeout: 300
4143

44+
# NATS messaging system
45+
- name: nats
46+
namespace: infra
47+
chart: nats/nats
48+
values:
49+
- values/nats.values.yaml
50+
# Wait for NATS to be ready before proceeding
51+
wait: true
52+
timeout: 300
53+

values/nats.values.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# NATS configuration for local development
2+
# Minimal single-node setup with JetStream persistence
3+
4+
config:
5+
cluster:
6+
enabled: false
7+
8+
jetstream:
9+
enabled: true
10+
fileStore:
11+
pvc:
12+
enabled: true
13+
size: 1Gi
14+
storageClassName: local-path
15+
16+
# Single replica for local development
17+
container:
18+
image:
19+
pullPolicy: IfNotPresent
20+
env:
21+
# Disable advertise to avoid issues in k3d
22+
NATS_NO_ADVERTISE: "true"
23+
24+
# Resource limits for local development
25+
resources:
26+
requests:
27+
cpu: 50m
28+
memory: 64Mi
29+
limits:
30+
cpu: 250m
31+
memory: 256Mi
32+
33+
# Single NATS server replica
34+
replicaCount: 1
35+
36+
# Disable NATS monitoring for local development
37+
promExporter:
38+
enabled: false
39+
40+
# Service configuration
41+
service:
42+
enabled: true
43+
ports:
44+
nats:
45+
enabled: true

0 commit comments

Comments
 (0)