swadhinbiswas

[email protected]
2026-07-26 20:14:01 +0600 committed NaN years ago
64639da
commit 64639da
3 files changed
+29 -0
▼Dockerfile
+4-0
48
48
RUN useradd -m -u 1000 -s /bin/bash justapi
49
49
USER justapi
50
50
51
+# Health check — verifies the server is responding on /live
52
+HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
53
+ CMD ["python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/live')"]
54
+
51
55
ENTRYPOINT ["python", "demo_app.py"]
52
56
▼helm/justapi/templates/pdb.yaml
+18-0
1
+{{- if .Values.podDisruptionBudget.enabled }}
2
+apiVersion: policy/v1
3
+kind: PodDisruptionBudget
4
+metadata:
5
+ name: {{ include "justapi.fullname" . }}
6
+ labels:
7
+ {{- include "justapi.labels" . | nindent 4 }}
8
+spec:
9
+ {{- if .Values.podDisruptionBudget.minAvailable }}
10
+ minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
11
+ {{- end }}
12
+ {{- if .Values.podDisruptionBudget.maxUnavailable }}
13
+ maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
14
+ {{- end }}
15
+ selector:
16
+ matchLabels:
17
+ {{- include "justapi.selectorLabels" . | nindent 6 }}
18
+{{- end }}
0
19
▼helm/justapi/values.yaml
+7-0
102
102
tolerations: []
103
103
affinity: {}
104
104
105
+# Pod Disruption Budget — ensures at least N pods remain available during
106
+# voluntary disruptions (node drain, cluster upgrade, etc.)
107
+podDisruptionBudget:
108
+ enabled: true
109
+ minAvailable: 1
110
+ # maxUnavailable: 1 # alternative to minAvailable
111
+
105
112
env:
106
113
- name: RUST_LOG
107
114
value: info
108
115