vaultwarden.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: vaultwarden
  6. ---
  7. apiVersion: apps/v1
  8. kind: Deployment
  9. metadata:
  10. name: vaultwarden
  11. namespace: vaultwarden
  12. spec:
  13. selector:
  14. matchLabels:
  15. app: vaultwarden
  16. replicas: 1
  17. template:
  18. metadata:
  19. labels:
  20. app: vaultwarden
  21. spec:
  22. containers:
  23. - name: vaultwarden
  24. image: vaultwarden/server:1.26.0
  25. ports:
  26. - containerPort: 80
  27. name: http-web-svc
  28. - containerPort: 3012
  29. name: http-sock-svc
  30. envFrom:
  31. - secretRef:
  32. name: vaultwarden-secret
  33. env:
  34. - name: WEBSOCKET_ENABLED
  35. value: "true"
  36. - name: SIGNUPS_ALLOWED
  37. value: "false"
  38. volumeMounts:
  39. - mountPath: "/data"
  40. name: data
  41. livenessProbe:
  42. httpGet:
  43. path: /
  44. port: 80
  45. failureThreshold: 10
  46. initialDelaySeconds: 30
  47. periodSeconds: 10
  48. volumes:
  49. - name: data
  50. persistentVolumeClaim:
  51. claimName: vaultwarden-pvc
  52. ---
  53. apiVersion: v1
  54. kind: Service
  55. metadata:
  56. name: vaultwarden-service
  57. namespace: vaultwarden
  58. spec:
  59. selector:
  60. app: vaultwarden
  61. type: ClusterIP
  62. ports:
  63. - name: vaultwarden-web-port
  64. protocol: TCP
  65. port: 80
  66. targetPort: http-web-svc
  67. - name: vaultwarden-sock-port
  68. protocol: TCP
  69. port: 3012
  70. targetPort: http-sock-svc
  71. ---
  72. apiVersion: traefik.containo.us/v1alpha1
  73. kind: IngressRoute
  74. metadata:
  75. name: vaultwarden
  76. namespace: vaultwarden
  77. spec:
  78. entryPoints:
  79. - websecure
  80. routes:
  81. - kind: Rule
  82. match: Host(`vaultwarden.jibby.org`)
  83. services:
  84. - kind: Service
  85. name: vaultwarden-service
  86. port: 80
  87. - kind: Rule
  88. match: Host(`vaultwarden.jibby.org`) && Path(`/notifications/hub`)
  89. services:
  90. - kind: Service
  91. name: vaultwarden-service
  92. port: 3012