Skip to content

Commit 31005c4

Browse files
committed
feat(#594): added probes to most of the pods
Added probes to the kubernetes-pods with a REST-API-server. Signed-off-by: Tobias Anker <tobias.anker@kitsunemimi.moe>
1 parent 6ac6976 commit 31005c4

13 files changed

Lines changed: 134 additions & 7 deletions

File tree

.github/workflows/build_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ jobs:
985985
sudo apt-get install -y wireguard-tools
986986
pip3 install jinja2
987987
cd ${GITHUB_REPOSITORY#*/}/deploy/k8s
988-
python3 wg_gen.py
988+
python3 wg_gen.py --namespace default
989989
-
990990
name: Label nodes
991991
run: |

deploy/k8s/ainari/templates/hanami/hanami-deployment.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,27 @@ spec:
7070
mountPath: /etc/ainari/hanami.toml
7171
subPath: hanami.toml
7272
readOnly: true
73+
readinessProbe:
74+
exec:
75+
command:
76+
- curl
77+
- --fail
78+
- localhost:11418/v1alpha/is_ready
79+
initialDelaySeconds: 5
80+
periodSeconds: 10
81+
timeoutSeconds: 2
82+
successThreshold: 1
83+
failureThreshold: 3
84+
livenessProbe:
85+
exec:
86+
command:
87+
- curl
88+
- --fail
89+
- localhost:11418/v1alpha/is_ready
90+
initialDelaySeconds: 15
91+
periodSeconds: 20
92+
timeoutSeconds: 2
93+
failureThreshold: 3
7394

7495
- name: tls-termination
7596
image: nginx:latest

deploy/k8s/ainari/templates/miko/miko-deployment.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,27 @@ spec:
5757
mountPath: /etc/ainari/token_key
5858
subPath: token-key
5959
readOnly: true
60+
readinessProbe:
61+
exec:
62+
command:
63+
- curl
64+
- --fail
65+
- localhost:10417/v1alpha/is_ready
66+
initialDelaySeconds: 5
67+
periodSeconds: 10
68+
timeoutSeconds: 2
69+
successThreshold: 1
70+
failureThreshold: 3
71+
livenessProbe:
72+
exec:
73+
command:
74+
- curl
75+
- --fail
76+
- localhost:10417/v1alpha/is_ready
77+
initialDelaySeconds: 15
78+
periodSeconds: 20
79+
timeoutSeconds: 2
80+
failureThreshold: 3
6081

6182
- name: tls-termination
6283
image: nginx:latest

deploy/k8s/ainari/templates/omamori/omamori-deployment.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,27 @@ spec:
6565
mountPath: /etc/ainari/omamori.toml
6666
subPath: omamori.toml
6767
readOnly: true
68+
readinessProbe:
69+
exec:
70+
command:
71+
- curl
72+
- --fail
73+
- localhost:10421/v1alpha/is_ready
74+
initialDelaySeconds: 5
75+
periodSeconds: 10
76+
timeoutSeconds: 2
77+
successThreshold: 1
78+
failureThreshold: 3
79+
livenessProbe:
80+
exec:
81+
command:
82+
- curl
83+
- --fail
84+
- localhost:10421/v1alpha/is_ready
85+
initialDelaySeconds: 15
86+
periodSeconds: 20
87+
timeoutSeconds: 2
88+
failureThreshold: 3
6889

6990
- name: tls-termination
7091
image: nginx:latest

deploy/k8s/ainari/templates/ryokan/ryokan-deployment.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,27 @@ spec:
8080
add:
8181
- NET_ADMIN
8282
- SYS_MODULE
83-
83+
readinessProbe:
84+
exec:
85+
command:
86+
- curl
87+
- --fail
88+
- localhost:10416/v1alpha/is_ready
89+
initialDelaySeconds: 5
90+
periodSeconds: 10
91+
timeoutSeconds: 2
92+
successThreshold: 1
93+
failureThreshold: 3
94+
livenessProbe:
95+
exec:
96+
command:
97+
- curl
98+
- --fail
99+
- localhost:10416/v1alpha/is_ready
100+
initialDelaySeconds: 15
101+
periodSeconds: 20
102+
timeoutSeconds: 2
103+
failureThreshold: 3
84104

85105

86106
- name: tls-termination

deploy/k8s/ainari/templates/sakura/sakura-statefulset.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,27 @@ spec:
9696
add:
9797
- NET_ADMIN
9898
- SYS_MODULE
99+
readinessProbe:
100+
exec:
101+
command:
102+
- curl
103+
- --fail
104+
- localhost:11420/v1alpha/is_ready
105+
initialDelaySeconds: 5
106+
periodSeconds: 10
107+
timeoutSeconds: 2
108+
successThreshold: 1
109+
failureThreshold: 3
110+
livenessProbe:
111+
exec:
112+
command:
113+
- curl
114+
- --fail
115+
- localhost:11420/v1alpha/is_ready
116+
initialDelaySeconds: 15
117+
periodSeconds: 20
118+
timeoutSeconds: 2
119+
failureThreshold: 3
99120

100121
- name: tls-termination
101122
image: nginx:latest

deploy/k8s/ainari/templates/torii/torii-deployment.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,28 @@ spec:
6565
mountPath: /etc/ainari/torii.toml
6666
subPath: torii.toml
6767
readOnly: true
68-
68+
readinessProbe:
69+
exec:
70+
command:
71+
- curl
72+
- --fail
73+
- localhost:10419/v1alpha/is_ready
74+
initialDelaySeconds: 5
75+
periodSeconds: 10
76+
timeoutSeconds: 2
77+
successThreshold: 1
78+
failureThreshold: 3
79+
livenessProbe:
80+
exec:
81+
command:
82+
- curl
83+
- --fail
84+
- localhost:10419/v1alpha/is_ready
85+
initialDelaySeconds: 15
86+
periodSeconds: 20
87+
timeoutSeconds: 2
88+
failureThreshold: 3
89+
6990
- name: tls-termination
7091
image: nginx:latest
7192
volumeMounts:

dockerfiles/Dockerfile_hanami

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FROM debian:12.12-slim@sha256:78d2f66e0fec9e5a39fb2c72ea5e052b548df75602b5215ed0
3939
ARG DEBIAN_FRONTEND=noninteractive
4040

4141
RUN apt-get update && \
42-
apt-get install -y openssl libsqlite3-0 && \
42+
apt-get install -y curl openssl libsqlite3-0 && \
4343
apt-get clean autoclean &&\
4444
apt-get autoremove --yes
4545

dockerfiles/Dockerfile_miko

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FROM debian:12.12-slim@sha256:78d2f66e0fec9e5a39fb2c72ea5e052b548df75602b5215ed0
3939
ARG DEBIAN_FRONTEND=noninteractive
4040

4141
RUN apt-get update && \
42-
apt-get install -y openssl libsqlite3-0 && \
42+
apt-get install -y curl openssl libsqlite3-0 && \
4343
apt-get clean autoclean &&\
4444
apt-get autoremove --yes
4545

dockerfiles/Dockerfile_omamori

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FROM debian:12.12-slim@sha256:78d2f66e0fec9e5a39fb2c72ea5e052b548df75602b5215ed0
3939
ARG DEBIAN_FRONTEND=noninteractive
4040

4141
RUN apt-get update && \
42-
apt-get install -y openssl libsqlite3-0 && \
42+
apt-get install -y curl openssl libsqlite3-0 && \
4343
apt-get clean autoclean &&\
4444
apt-get autoremove --yes
4545

0 commit comments

Comments
 (0)