Skip to content

Commit 921faa4

Browse files
authored
Merge pull request #798 from kitsudaiki/feat/add-probes-to-kubernetes-setup2
related issue: #594
2 parents 6ac6976 + 92e91c8 commit 921faa4

14 files changed

Lines changed: 144 additions & 17 deletions

.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: |

.secrets.baseline

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
"filename": "deploy/k8s/ainari/templates/hanami/hanami-deployment.yaml",
175175
"hashed_secret": "a1b78300299f72872366d7a0c32a5f19512c9d32",
176176
"is_verified": false,
177-
"line_number": 96
177+
"line_number": 117
178178
}
179179
],
180180
"deploy/k8s/ainari/templates/internal-api-key-secret.yaml": [
@@ -201,14 +201,14 @@
201201
"filename": "deploy/k8s/ainari/templates/miko/miko-deployment.yaml",
202202
"hashed_secret": "a8fd869cf678cfd350b2aa8fb2bc4e030c75e11d",
203203
"is_verified": false,
204-
"line_number": 80
204+
"line_number": 101
205205
},
206206
{
207207
"type": "Secret Keyword",
208208
"filename": "deploy/k8s/ainari/templates/miko/miko-deployment.yaml",
209209
"hashed_secret": "298bddaea9b4590f81a8c8c5629e7a6417415c64",
210210
"is_verified": false,
211-
"line_number": 86
211+
"line_number": 107
212212
}
213213
],
214214
"deploy/k8s/ainari/templates/omamori/omamori-certificate.yaml": [
@@ -235,7 +235,7 @@
235235
"filename": "deploy/k8s/ainari/templates/omamori/omamori-deployment.yaml",
236236
"hashed_secret": "b42d97659f427e4287f30f0cd8bdc2ac5d3b10b5",
237237
"is_verified": false,
238-
"line_number": 91
238+
"line_number": 112
239239
}
240240
],
241241
"deploy/k8s/ainari/templates/onsen/onsen-statefulset.yaml": [
@@ -262,14 +262,14 @@
262262
"filename": "deploy/k8s/ainari/templates/ryokan/ryokan-deployment.yaml",
263263
"hashed_secret": "04f5ffaec2d0437e26b1e224de6915e15247989f",
264264
"is_verified": false,
265-
"line_number": 108
265+
"line_number": 128
266266
},
267267
{
268268
"type": "Secret Keyword",
269269
"filename": "deploy/k8s/ainari/templates/ryokan/ryokan-deployment.yaml",
270270
"hashed_secret": "8ecbfb09891f75ade7c286346fe355113e680af7",
271271
"is_verified": false,
272-
"line_number": 114
272+
"line_number": 134
273273
}
274274
],
275275
"deploy/k8s/ainari/templates/sakura/sakura-certificate.yaml": [
@@ -287,14 +287,14 @@
287287
"filename": "deploy/k8s/ainari/templates/sakura/sakura-statefulset.yaml",
288288
"hashed_secret": "1db3a3e51c405b71091fd7885f714805187b5785",
289289
"is_verified": false,
290-
"line_number": 130
290+
"line_number": 151
291291
},
292292
{
293293
"type": "Secret Keyword",
294294
"filename": "deploy/k8s/ainari/templates/sakura/sakura-statefulset.yaml",
295295
"hashed_secret": "845e1c68668309b563d8a17950b9529de8b3616e",
296296
"is_verified": false,
297-
"line_number": 136
297+
"line_number": 157
298298
}
299299
],
300300
"deploy/k8s/ainari/templates/torii/torii-certificate.yaml": [
@@ -312,7 +312,7 @@
312312
"filename": "deploy/k8s/ainari/templates/torii/torii-deployment.yaml",
313313
"hashed_secret": "88f7f6dda5e81f2e7958ef4d21771d2c66f2351a",
314314
"is_verified": false,
315-
"line_number": 91
315+
"line_number": 112
316316
}
317317
],
318318
"deploy/k8s/wg_gen.py": [
@@ -604,5 +604,5 @@
604604
}
605605
]
606606
},
607-
"generated_at": "2026-01-04T15:26:24Z"
607+
"generated_at": "2026-01-04T20:37:39Z"
608608
}

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

0 commit comments

Comments
 (0)