Skip to content

Commit 62a0fc4

Browse files
deploy improved version
1 parent bf6d7aa commit 62a0fc4

3 files changed

Lines changed: 398 additions & 3 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /app
55
COPY requirements.txt .
66
RUN pip install --no-cache-dir -r requirements.txt
77

8-
COPY service_monitor.py .
9-
RUN chmod +x service_monitor.py
8+
COPY service_monitor_v2.py .
9+
RUN chmod +x service_monitor_v2.py
1010

11-
CMD ["./service_monitor.py"]
11+
CMD ["./service_monitor_v2.py"]

k8s/deployment.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,22 @@ spec:
3333
limits:
3434
cpu: "200m"
3535
memory: "256Mi"
36+
livenessProbe:
37+
exec:
38+
command:
39+
- cat
40+
- /tmp/healthy
41+
initialDelaySeconds: 30
42+
periodSeconds: 30
43+
failureThreshold: 3
3644
securityContext:
3745
allowPrivilegeEscalation: false
3846
runAsNonRoot: true
3947
runAsUser: 1000
4048
readOnlyRootFilesystem: true
49+
volumeMounts:
50+
- name: tmp
51+
mountPath: /tmp
52+
volumes:
53+
- name: tmp
54+
emptyDir: {}

0 commit comments

Comments
 (0)