Skip to content

Hooks for more customization #6982

@tiborvass

Description

@tiborvass

There are a few issues that ask for specific hooks, but none of them have apparently been fully addressed. The ones that are closed were promised a "generic" hooks mechanism for all commands/events.

A few usecases from reading the issues:

From kubernetes/kubernetes#140 (comment):

[...] we felt there were two cases we wanted to handle:

  • hooks that either need the container context (and as such executing outside the process namespace would be pointless), or if interrupted by container shutdown would not be internally inconsistent. Pre-termination is a good example
  • hooks that should be outside of a container, because they need to continue to run even if a container fails. Deploy across multiple containers is a good example, or post-termination.

Please feel free to comment with more.

It makes sense to offer hooks for greater customization, however, this might affect the current way of doing things (see the exec discussion in #3317 (comment))

For solutions, there was a mention of "predefined paths" for executables.

Some hooks (start and shutdown) would be more useful if they were executed synchronously (unlike how docker events fires currently).

We need to define what hooks should be implemented in docker and what should be done externally via docker events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiAPIkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions