Remove hardcoded Redis configuration from config.exs

- Move Redis connection settings to runtime.exs only
- Remove localhost:6379 hardcoded values that were overriding runtime config
- Keep only non-environment-dependent Exq settings in compile-time config
- Fixes Exq trying to connect to localhost instead of Kubernetes Redis service

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-27 10:14:38 -05:00
parent 269ec5a070
commit de74593d08
No known key found for this signature in database
4 changed files with 43 additions and 4 deletions

View file

@ -32,12 +32,9 @@ config :aprsme, AprsmeWeb.Gettext,
default_locale: "en"
# Configure Exq for background jobs
# Redis connection settings are configured in runtime.exs
config :exq,
name: Exq,
host: "localhost",
port: 6379,
password: "",
database: 0,
concurrency: :infinite,
queues: [
{"default", 10},

View file

@ -0,0 +1,11 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: aprs-pdb
namespace: aprs
spec:
minAvailable: 1
selector:
matchLabels:
app: aprs
unhealthyPodEvictionPolicy: IfHealthyBudget

View file

@ -0,0 +1,12 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: aprs
namespace: aprs
spec:
updateStrategy:
type: RollingUpdate
rollingUpdate:
partition: 0
maxUnavailable: 0 # This ensures pods are only terminated after new ones are ready
minReadySeconds: 30 # Wait 30 seconds after a pod is ready before considering the update successful

View file

@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: aprs
namespace: aprs
spec:
template:
spec:
containers:
- name: aprs
startupProbe:
httpGet:
path: /health
port: 4000
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 12 # Gives 60 seconds total to start up