For now, you only have the pre-stop hook or a SIGTERM handler that has 
deletionGracePeriodSeconds to finish.
I described something exactly like what you asked for 
in https://github.com/kubernetes/kubernetes/issues/28706, please comment on 
the bug it those suggestion won't work for you. 

On Monday, July 11, 2016 at 3:52:37 PM UTC-7, Warren Strange wrote:
>
>
> I have a PetSet working to scale up OpenDJ ldap servers.
>
> My challenge is on scaling it back down. The OpenDJ server requires that 
> the scaled down node 
> be taken out of the replication topology.  Leaving it in will cause issues 
> as the other servers attempt to replicate
> to the non-existent node. 
>
> What I would like is a hook to run another container or series of commands 
> when the petset is scaled down. Kind of the
> opposite of an init container.   
>
> I suppose I could do this on container terminate but that seems a bit 
> kludgy? I need to distinguish between the pod being restarted vs. the 
> petset being scaled down. 
>
> Any suggestions?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to