<p>We have a scenario in our deployment process where an activity needs to be performed only once before the actual application containers are live and ready. This activity can not be placed as an init container because init container will be executed with every replica of application container but in this case, this activity needs to be done only once. </p>

<p>To achieve this, I have created a kubernetes job which executes that activity and completes. </p>

<ol>
<li><p>Is there a way to check in my application container deployment definition that this particular Job has been completed? Are there any pre-defined keys in kubernetes which stores this metadata information and can be used to identify the job status?</p></li>
<li><p>This Job is using a configMap and the container used in this Job loads the configuration files (provided by configMap) in Directory Server.  Is there a way to trigger the job automatically if configMap changes? I can delete the job and recreate using kubectl but I am looking for an auto trigger. 
Is there any possible way available in OpenShift or HELM to do this if not in Kubernetes?</p></li>
</ol>

<p>Helm has post-deploy hooks for this kind of thing, though they can be a little rough to work with. We use a custom operator for this so we can have an explicit state machine on our deployments (init -> migrate -> deploy -> test -> ready). But that's a lot of work to write.</p>
