Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#310 from fmount/dumb-init
Browse files Browse the repository at this point in the history
Move -log sidecar container to dumb-init
  • Loading branch information
ASBishop authored Dec 14, 2023
2 parents a3f1200 + e109a39 commit 8a4acd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
11 changes: 9 additions & 2 deletions pkg/cinderapi/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,16 @@ func Deployment(
{
Name: instance.Name + "-log",
Command: []string{
"/bin/bash",
"/usr/bin/dumb-init",
},
Args: []string{
"--single-child",
"--",
"/usr/bin/tail",
"-n+1",
"-F",
LogFile,
},
Args: []string{"-c", "tail -n+1 -F " + LogFile},
Image: instance.Spec.ContainerImage,
SecurityContext: &corev1.SecurityContext{
RunAsUser: &runAsUser,
Expand Down
10 changes: 7 additions & 3 deletions test/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@ spec:
weight: 1
containers:
- args:
- -c
- tail -n+1 -F /var/log/cinder/cinder-api.log
- --single-child
- --
- /usr/bin/tail
- -n+1
- -F
- /var/log/cinder/cinder-api.log
command:
- /bin/bash
- /usr/bin/dumb-init
imagePullPolicy: IfNotPresent
resources: {}
securityContext:
Expand Down

0 comments on commit 8a4acd3

Please sign in to comment.