mirror of
https://github.com/vmware-tanzu/velero.git
synced 2025-12-23 06:15:21 +00:00
Merge pull request #795 from wwitzel3/hooks-with-pv
Update Pre/Post hooks example.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user