mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
pod create: add --infra-conmon-pidfile
Add an `--infra-conmon-pidfile` flag to `podman-pod-create` to write the infra container's conmon process ID to a specified path. Several container sub-commands already support `--conmon-pidfile` which is especially helpful to allow for systemd to access and track the conmon processes. This allows for easily tracking the conmon process of a pod's infra container. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -1550,6 +1550,18 @@ func WithPodCreateCommand() PodCreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithInfraConmonPidFile sets the path to a custom conmon PID file for the
|
||||
// infra container.
|
||||
func WithInfraConmonPidFile(path string) PodCreateOption {
|
||||
return func(pod *Pod) error {
|
||||
if pod.valid {
|
||||
return define.ErrPodFinalized
|
||||
}
|
||||
pod.config.InfraContainer.ConmonPidFile = path
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithPodLabels sets the labels of a pod.
|
||||
func WithPodLabels(labels map[string]string) PodCreateOption {
|
||||
return func(pod *Pod) error {
|
||||
|
Reference in New Issue
Block a user