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:
parent
269ec5a070
commit
de74593d08
4 changed files with 43 additions and 4 deletions
|
|
@ -32,12 +32,9 @@ config :aprsme, AprsmeWeb.Gettext,
|
||||||
default_locale: "en"
|
default_locale: "en"
|
||||||
|
|
||||||
# Configure Exq for background jobs
|
# Configure Exq for background jobs
|
||||||
|
# Redis connection settings are configured in runtime.exs
|
||||||
config :exq,
|
config :exq,
|
||||||
name: Exq,
|
name: Exq,
|
||||||
host: "localhost",
|
|
||||||
port: 6379,
|
|
||||||
password: "",
|
|
||||||
database: 0,
|
|
||||||
concurrency: :infinite,
|
concurrency: :infinite,
|
||||||
queues: [
|
queues: [
|
||||||
{"default", 10},
|
{"default", 10},
|
||||||
|
|
|
||||||
11
k8s/poddisruptionbudget.yaml
Normal file
11
k8s/poddisruptionbudget.yaml
Normal 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
|
||||||
12
k8s/statefulset-patch.yaml
Normal file
12
k8s/statefulset-patch.yaml
Normal 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
|
||||||
19
k8s/statefulset-startup-probe-patch.yaml
Normal file
19
k8s/statefulset-startup-probe-patch.yaml
Normal 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
|
||||||
Loading…
Add table
Reference in a new issue