Merge pull request #795 from wwitzel3/hooks-with-pv

Update Pre/Post hooks example.
This commit is contained in:
Nolan Brubaker
2018-09-05 16:46:24 -04:00
committed by GitHub
4 changed files with 83 additions and 5 deletions

View File

@@ -48,6 +48,11 @@ spec:
metadata:
labels:
app: nginx
annotations:
pre.hook.backup.ark.heptio.com/container: fsfreeze
pre.hook.backup.ark.heptio.com/command: '["/sbin/fsfreeze", "--freeze", "/var/log/nginx"]'
post.hook.backup.ark.heptio.com/container: fsfreeze
post.hook.backup.ark.heptio.com/command: '["/sbin/fsfreeze", "--unfreeze", "/var/log/nginx"]'
spec:
volumes:
- name: nginx-logs
@@ -62,6 +67,14 @@ spec:
- mountPath: "/var/log/nginx"
name: nginx-logs
readOnly: false
- image: gcr.io/heptio-images/fsfreeze-pause:latest
name: fsfreeze
securityContext:
privileged: true
volumeMounts:
- mountPath: "/var/log/nginx"
name: nginx-logs
readOnly: false
---
apiVersion: v1