Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ services:

# LocalStack for S3 emulation
localstack:
image: localstack/localstack:3.0
# 4.14.0, not 3.0: 3.0 is 3.0.2 on Debian 12 (glibc 2.36), whose setenv
# frees the environ array it outgrows while another thread's getenv may
# still read it. LocalStack adds its AWS credentials to the environment
# at startup while its analytics thread is in getaddrinfo, and about one
# start in 2000 dies of SIGSEGV (exit 245). 4.14.0 is Debian 13 (glibc
# 2.41, which keeps the old array) and starts without an auth token.
image: localstack/localstack:4.14.0
container_name: orderflow-localstack
ports:
- "4566:4566"
Expand Down
12 changes: 9 additions & 3 deletions orderflow-k8s/base/localstack/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ spec:
app: localstack
spec:
# ── Mac ARM64 (Apple Silicon) ──────────────────────────────────────────
# localstack/localstack:3.0 ships a native linux/arm64 layer.
# localstack/localstack:4.14.0 ships a native linux/arm64 layer. It is
# the compose file's LocalStack (see the reason there).
nodeSelector:
kubernetes.io/arch: arm64
containers:
- name: localstack
image: localstack/localstack:3.0
image: localstack/localstack:4.14.0
ports:
- containerPort: 4566
env:
Expand All @@ -61,8 +62,13 @@ spec:
- name: AWS_DEFAULT_REGION
value: "us-east-1"
volumeMounts:
# The hook alone (subPath), not the whole ConfigMap volume:
# LocalStack 4.x runs every script under ready.d, its
# subdirectories too, so it would also run the copy in the
# volume's hidden timestamped directory, and run the hook twice.
- name: localstack-init
mountPath: /etc/localstack/init/ready.d
mountPath: /etc/localstack/init/ready.d/init.sh
subPath: init.sh
- name: localstack-data
mountPath: /var/lib/localstack
readinessProbe:
Expand Down
2 changes: 1 addition & 1 deletion producer/handlers/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (h *OrderHandler) CreateOrder(w http.ResponseWriter, r *http.Request) {
log.Printf("Kafka event published for order %s", order.ID)
}

order.Status = "created"
order.Status = "order created"
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
json.NewEncoder(w).Encode(map[string]interface{}{
Expand Down
Loading