<p dir="auto">The current behavior of init containers is to run a set of init containers for every pod.</p>
<p dir="auto">It would be nice if the behavior could be extended so that we can define a set of init containers for a deployment. This would be extremely useful if we have an app that talks to a database and would need to run database migrations or perform some action or task exclusively for the whole deployment during startup. We can then run these tasks in an init container, but only in 1 container per deployment.</p>
<p dir="auto">Users often need a means to inject custom behavior into the lifecycle of a deployment process. The deployment API (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="45532851" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1743" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1743/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1743">#1743</a>) could be expanded to support the execution user-specified Docker images which are given an opportunity to complete at various points during the recon process for a deployment.</p>
<p dir="auto">Use cases and various design approaches were discussed previously in an <a href="https://github.com/openshift/origin/blob/master/docs/proposals/post-deployment-hooks.md">OpenShift deployment hooks proposal</a>.</p>
<p dir="auto">This RFC is to capture initial thoughts on the topic and to link any existing related issues.</p>