Guest User

Velero FSB to csi-s3 driver

a guest
Oct 26th, 2024
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.36 KB | Source Code | 0 0
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5.   name: fsb-pvc-ns
  6.  
  7. ---
  8. apiVersion: v1
  9. kind: PersistentVolumeClaim
  10. metadata:
  11.   name: large-pvc
  12.   namespace: fsb-pvc-ns
  13. spec:
  14.   storageClassName: csi-s3
  15.   accessModes:
  16.    - ReadWriteMany
  17.   resources:
  18.     requests:
  19.       storage: 2Gi
  20.  
  21. ---
  22. apiVersion: batch/v1
  23. kind: Job
  24. metadata:
  25.   name: volume-writer
  26.   namespace: fsb-pvc-ns
  27.   labels:
  28.     app.kubernetes.io/name: volume-writer
  29. spec:
  30.   template:
  31.     metadata:
  32.       labels:
  33.         app.kubernetes.io/name: volume-writer
  34.     spec:
  35.       restartPolicy: OnFailure
  36.       volumes:
  37.         - name: large-pvc
  38.           persistentVolumeClaim:
  39.             claimName: large-pvc
  40.       containers:
  41.         - name: pvc-writer
  42.           image: busybox
  43.           volumeMounts:
  44.             - name: large-pvc
  45.               mountPath: /mnt/pvc
  46.           command:
  47.            - sh
  48.             - -c
  49.             - >-
  50.               dd if=/dev/urandom of=/mnt/pvc/10mb-1.bin bs=1M count=10;
  51.               dd if=/dev/urandom of=/mnt/pvc/10mb-2.bin bs=1M count=10;
  52.               md5sum /mnt/pvc/10mb-1.bin | tee /mnt/pvc/10mb-1.md5;
  53.               md5sum /mnt/pvc/10mb-2.bin | tee /mnt/pvc/10mb-2.md5;
  54.               echo hello world > /mnt/pvc/msg.txt;
  55.           resources:
  56.             limits:
  57.               cpu: 200m
  58.               memory: 200Mi
  59.             requests:
  60.               cpu: 10m
  61.               memory: 10Mi
  62.  
  63. ---
  64. apiVersion: apps/v1
  65. kind: Deployment
  66. metadata:
  67.   name: sleep
  68.   namespace: fsb-pvc-ns
  69.   labels:
  70.     app.kubernetes.io/name: sleep
  71. spec:
  72.   replicas: 1
  73.   selector:
  74.     matchLabels:
  75.       app.kubernetes.io/name: sleep
  76.   template:
  77.     metadata:
  78.       labels:
  79.         app.kubernetes.io/name: sleep
  80.       annotations:
  81.         backup.velero.io/backup-volumes: large-pvc
  82.     spec:
  83.       volumes:
  84.         - name: large-pvc
  85.           persistentVolumeClaim:
  86.             claimName: large-pvc
  87.       containers:
  88.         - name: sleep
  89.           image: busybox
  90.           volumeMounts:
  91.             - name: large-pvc
  92.               mountPath: /mnt/pvc
  93.               readOnly: true
  94.           command:
  95.            - sh
  96.             - -c
  97.             - while true; do sleep 3600; done
  98.           resources:
  99.             limits:
  100.               cpu: 20m
  101.               memory: 20Mi
  102.             requests:
  103.               cpu: 10m
  104.               memory: 10Mi
  105.  
Tags: k8s
Advertisement
Add Comment
Please, Sign In to add comment