From a59035ad2bf454979d724b482c403efde4d8bee9 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Mon, 7 Oct 2024 11:02:13 +0200 Subject: [PATCH] add support for extensions in hooks Signed-off-by: Nicolas De Loof --- types/derived.gen.go | 6 ++++++ types/hooks.go | 2 ++ 2 files changed, 8 insertions(+) diff --git a/types/derived.gen.go b/types/derived.gen.go index b4ba0d2e..bc5b5d9b 100644 --- a/types/derived.gen.go +++ b/types/derived.gen.go @@ -1862,6 +1862,12 @@ func deriveDeepCopy_42(dst, src *ServiceHook) { } else { dst.Environment = nil } + if src.Extensions != nil { + dst.Extensions = make(map[string]any, len(src.Extensions)) + src.Extensions.DeepCopy(dst.Extensions) + } else { + dst.Extensions = nil + } } // deriveDeepCopy_43 recursively copies the contents of src into dst. diff --git a/types/hooks.go b/types/hooks.go index 964662a6..4c58c094 100644 --- a/types/hooks.go +++ b/types/hooks.go @@ -23,4 +23,6 @@ type ServiceHook struct { Privileged bool `yaml:"privileged,omitempty" json:"privileged,omitempty"` WorkingDir string `yaml:"working_dir,omitempty" json:"working_dir,omitempty"` Environment MappingWithEquals `yaml:"environment,omitempty" json:"environment,omitempty"` + + Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"` }