Libvirt: gracefully shutdown libvirt process on container stop.

This PS gracefully shutdowns the libvirt process on pod termiantion.

Change-Id: I4f7f2cac2e2a8586f5c40ac1ad556be74e29459a
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley
2018-08-15 13:44:07 -05:00
committed by Pete Birley
parent c6987bf8e0
commit da01b0c09c

View File

@@ -121,6 +121,14 @@ spec:
{{ end }}
command:
- /tmp/libvirt.sh
lifecycle:
preStop:
exec:
command:
- bash
- -c
- |-
kill $(cat /var/run/libvirtd.pid)
volumeMounts:
- name: libvirt-bin
mountPath: /tmp/libvirt.sh