Skip to content

Commit

Permalink
Move -log sidecar container to dumb-init
Browse files Browse the repository at this point in the history
As noticed in other operators, the -log sidecar ignores SIGTERM on
delete. This patch moves the ironic-operator to the dumb-init usage to
make sure the SIGTERM is handled properly by the sidecar.

Fixes: OSPRH-3278
  • Loading branch information
steveb committed May 8, 2024
1 parent aa12ec2 commit 5f3ffed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/ironicapi/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,16 @@ func Deployment(
{
Name: ironic.ServiceName + "-" + ironic.APIComponent + "-log",
Command: []string{
"/bin/bash",
"/usr/bin/dumb-init",
},
Args: []string{
"--single-child",
"--",
"/usr/bin/tail",
"-n+1",
"-F",
ironic.LogPath,
},
Args: []string{"-c", "tail -n+1 -F " + ironic.LogPath},
Image: instance.Spec.ContainerImage,
SecurityContext: &corev1.SecurityContext{
RunAsUser: &runAsUser,
Expand Down

0 comments on commit 5f3ffed

Please sign in to comment.