From fed1ecf470f85d68527498b029252d26c43f50ef Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 22 Sep 2020 14:39:36 +0200 Subject: pkg/hooks: support all hooks Add support for the missing hook types [1]: - createContainer - createRuntime - startContainer Otherwise, Podman won't inject them into the runtime config (and pass it on to runc/crun) but error out. [1] https://github.com/opencontainers/runtime-spec/blob/44341cdd36f6fee6ddd73e602f9e3eca1466052f/runtime.md#lifecycle Signed-off-by: Valentin Rothberg --- pkg/hooks/1.0.0/hook.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pkg/hooks/1.0.0/hook.go') diff --git a/pkg/hooks/1.0.0/hook.go b/pkg/hooks/1.0.0/hook.go index 77fbab5aa..244e8800f 100644 --- a/pkg/hooks/1.0.0/hook.go +++ b/pkg/hooks/1.0.0/hook.go @@ -67,7 +67,14 @@ func (hook *Hook) Validate(extensionStages []string) (err error) { return errors.New("missing required property: stages") } - validStages := map[string]bool{"prestart": true, "poststart": true, "poststop": true} + validStages := map[string]bool{ + "createContainer": true, + "createRuntime": true, + "prestart": true, + "poststart": true, + "poststop": true, + "startContainer": true, + } for _, stage := range extensionStages { validStages[stage] = true } -- cgit v1.2.3-54-g00ecf