File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,18 @@ func StatefulSet(
226226 SecurityContext : & corev1.SecurityContext {
227227 RunAsUser : & runAsUser ,
228228 },
229+ // inotifywait doesn't terminate on SIGTERM so call SIGKILL as a
230+ // pre-stop command
231+ Lifecycle : & corev1.Lifecycle {
232+ PreStop : & corev1.LifecycleHandler {
233+ Exec : & corev1.ExecAction {
234+ Command : []string {
235+ "/usr/bin/pkill" ,
236+ "inotifywait" ,
237+ },
238+ },
239+ },
240+ },
229241 }
230242
231243 containers := []corev1.Container {
Original file line number Diff line number Diff line change @@ -259,6 +259,18 @@ func StatefulSet(
259259 SecurityContext : & corev1.SecurityContext {
260260 RunAsUser : & runAsUser ,
261261 },
262+ // inotifywait doesn't terminate on SIGTERM so call SIGKILL as a
263+ // pre-stop command
264+ Lifecycle : & corev1.Lifecycle {
265+ PreStop : & corev1.LifecycleHandler {
266+ Exec : & corev1.ExecAction {
267+ Command : []string {
268+ "/usr/bin/pkill" ,
269+ "inotifywait" ,
270+ },
271+ },
272+ },
273+ },
262274 }
263275 containers = append (containers , ramdiskLogsContainer )
264276
You can’t perform that action at this time.
0 commit comments