Skip to content
Merged
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ for linux/amd64, like the SOyA web-cli it contains.
service, certificate (cert-manager, ClusterIssuer `letsencrypt-prod`) and ingress
(nginx).

The deployment runs two replicas with 16 threads each (`RAILS_MAX_THREADS`).
Replicas keep no state of their own: every check is answered by one replica
from the criteria and structures in the image. A replica whose threads are all
busy fails its readiness probe (`/version`) and is taken out of the ingress
until it answers again; the liveness probe only checks that the port is open, so
a busy replica is not restarted.

## Tests

```
Expand Down
20 changes: 15 additions & 5 deletions kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ kind: Deployment
metadata:
name: dpplint
spec:
replicas: 1
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app: dpplint
Expand All @@ -25,21 +30,26 @@ spec:
value: production
- name: DIDLINT_URL
value: https://didlint.ownyourdata.eu
- name: RAILS_MAX_THREADS
value: "16"
resources:
requests:
cpu: 100m
memory: 384Mi
memory: 512Mi
limits:
memory: 1Gi
readinessProbe:
httpGet:
path: /version
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 2
livenessProbe:
httpGet:
path: /up
tcpSocket:
port: 3000
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
Loading