mirror of
https://github.com/containers/podman.git
synced 2025-10-16 10:43:52 +08:00
Add support for StopSignal in quadlet .container files
Fixes: https://github.com/containers/podman/issues/23050 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -143,6 +143,7 @@ const (
|
||||
KeySecurityLabelType = "SecurityLabelType"
|
||||
KeySetWorkingDirectory = "SetWorkingDirectory"
|
||||
KeyShmSize = "ShmSize"
|
||||
KeyStopSignal = "StopSignal"
|
||||
KeyStopTimeout = "StopTimeout"
|
||||
KeySubGIDMap = "SubGIDMap"
|
||||
KeySubnet = "Subnet"
|
||||
@ -242,6 +243,7 @@ var (
|
||||
KeySecurityLabelNested: true,
|
||||
KeySecurityLabelType: true,
|
||||
KeyShmSize: true,
|
||||
KeyStopSignal: true,
|
||||
KeyStopTimeout: true,
|
||||
KeySubGIDMap: true,
|
||||
KeySubUIDMap: true,
|
||||
@ -843,6 +845,10 @@ func ConvertContainer(container *parser.UnitFile, names map[string]string, isUse
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if stopSignal, ok := container.Lookup(ContainerGroup, KeyStopSignal); ok && len(stopSignal) > 0 {
|
||||
podman.add("--stop-signal", stopSignal)
|
||||
}
|
||||
|
||||
if stopTimeout, ok := container.Lookup(ContainerGroup, KeyStopTimeout); ok && len(stopTimeout) > 0 {
|
||||
podman.add("--stop-timeout", stopTimeout)
|
||||
}
|
||||
|
Reference in New Issue
Block a user