diff --git a/config/config.exs b/config/config.exs index d176717..0d1421c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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}, diff --git a/k8s/poddisruptionbudget.yaml b/k8s/poddisruptionbudget.yaml new file mode 100644 index 0000000..63ca1f4 --- /dev/null +++ b/k8s/poddisruptionbudget.yaml @@ -0,0 +1,11 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: aprs-pdb + namespace: aprs +spec: + minAvailable: 1 + selector: + matchLabels: + app: aprs + unhealthyPodEvictionPolicy: IfHealthyBudget \ No newline at end of file diff --git a/k8s/statefulset-patch.yaml b/k8s/statefulset-patch.yaml new file mode 100644 index 0000000..6a3e412 --- /dev/null +++ b/k8s/statefulset-patch.yaml @@ -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 \ No newline at end of file diff --git a/k8s/statefulset-startup-probe-patch.yaml b/k8s/statefulset-startup-probe-patch.yaml new file mode 100644 index 0000000..96a8853 --- /dev/null +++ b/k8s/statefulset-startup-probe-patch.yaml @@ -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 \ No newline at end of file