011-persistencevolume.yaml 977 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ###############################
  2. # acme.json storage
  3. # This configuration obejct is optional and can be used to store the traefik acme.json file
  4. # in a longhorn persistence volume named 'traefik-data'
  5. # To enable the persistence storage you need to uncomment the volumeMouns in the 002-deployment.yml file.
  6. ###############################
  7. ---
  8. kind: PersistentVolume
  9. apiVersion: v1
  10. metadata:
  11. name: traefik-data
  12. namespace: kube-system
  13. spec:
  14. capacity:
  15. storage: 1Gi
  16. volumeMode: Filesystem
  17. accessModes:
  18. - ReadWriteOnce
  19. claimRef:
  20. namespace: kube-system
  21. name: traefik-data
  22. csi:
  23. driver: driver.longhorn.io
  24. fsType: ext4
  25. volumeHandle: traefik-data
  26. storageClassName: longhorn-durable
  27. ---
  28. apiVersion: v1
  29. kind: PersistentVolumeClaim
  30. metadata:
  31. name: traefik-data
  32. namespace: kube-system
  33. spec:
  34. accessModes:
  35. - ReadWriteOnce
  36. storageClassName: longhorn-durable
  37. resources:
  38. requests:
  39. storage: 1Gi
  40. volumeName: "traefik-data"