Skip to content

Commit f922f2a

Browse files
helsaawykiashok
authored andcommitted
Omnibus dependency updates (#2051)
Consolidate dependabot updates: - github.com//pull/2050 - github.com//pull/2048 - github.com//pull/2047 - github.com//pull/2046 - github.com//pull/2045 - github.com//pull/2044 - github.com//pull/2043 - github.com//pull/2042 Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com> (cherry picked from commit 060de7c) Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
1 parent 7d25ce2 commit f922f2a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

internal/hooks/spec.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ const (
1616

1717
// Prestart commands are executed after the container namespaces are created,
1818
// but before the user supplied command is executed from init.
19-
// Note: This hook is now deprecated
2019
// Prestart commands are called in the Runtime namespace.
20+
//
21+
// Deprecated: use [CreateRuntime] instead.
2122
Prestart HookName = "prestart"
2223

2324
// CreateRuntime commands MUST be called as part of the create operation after
@@ -27,7 +28,7 @@ const (
2728
CreateRuntime HookName = "createRuntime"
2829
)
2930

30-
// NewOCIHook creates a new oci.Hook with given parameters
31+
// NewOCIHook creates a new oci.Hook with given parameters.
3132
func NewOCIHook(path string, args, env []string) oci.Hook {
3233
return oci.Hook{
3334
Path: path,
@@ -36,14 +37,12 @@ func NewOCIHook(path string, args, env []string) oci.Hook {
3637
}
3738
}
3839

39-
// AddOCIHook adds oci.Hook of the given hook name to spec
40+
// AddOCIHook adds oci.Hook of the given hook name to spec.
4041
func AddOCIHook(spec *oci.Spec, hn HookName, hk oci.Hook) error {
4142
if spec.Hooks == nil {
4243
spec.Hooks = &oci.Hooks{}
4344
}
4445
switch hn {
45-
case Prestart:
46-
spec.Hooks.Prestart = append(spec.Hooks.Prestart, hk)
4746
case CreateRuntime:
4847
spec.Hooks.CreateRuntime = append(spec.Hooks.CreateRuntime, hk)
4948
default:

0 commit comments

Comments
 (0)