mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-11-08 08:57:24 +00:00
Integrate sd-notify policies into `kube play`. The policies can be configured for all contianers via the `io.containers.sdnotify` annotation or for indidivual containers via the `io.containers.sdnotify/$name` annotation. The `kube play` process will wait for all containers to be ready by waiting for the individual `READY=1` messages which are received via the `pkg/systemd/notifyproxy` proxy mechanism. Also update the simple "container" sd-notify test as it did not fully test the expected behavior which became obvious when adding the new tests. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
16 lines
497 B
Go
16 lines
497 B
Go
package abi
|
|
|
|
import "github.com/containers/podman/v4/libpod/define"
|
|
|
|
// getSdNotifyMode returns the `sdNotifyAnnotation/$name` for the specified
|
|
// name. If name is empty, it'll only look for `sdNotifyAnnotation`.
|
|
func getSdNotifyMode(annotations map[string]string, name string) (string, error) {
|
|
var mode string
|
|
switch len(name) {
|
|
case 0:
|
|
mode = annotations[sdNotifyAnnotation]
|
|
default:
|
|
mode = annotations[sdNotifyAnnotation+"/"+name]
|
|
}
|
|
return mode, define.ValidateSdNotifyMode(mode)
|
|
}
|