bitwarden-cli.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: bitwarden-cli
  5. namespace: external-secrets
  6. labels:
  7. app.kubernetes.io/instance: bitwarden-cli
  8. app.kubernetes.io/name: bitwarden-cli
  9. spec:
  10. replicas: 1
  11. strategy:
  12. type: Recreate
  13. selector:
  14. matchLabels:
  15. app.kubernetes.io/name: bitwarden-cli
  16. app.kubernetes.io/instance: bitwarden-cli
  17. template:
  18. metadata:
  19. labels:
  20. app.kubernetes.io/name: bitwarden-cli
  21. app.kubernetes.io/instance: bitwarden-cli
  22. spec:
  23. containers:
  24. - name: bitwarden-cli
  25. image: ghcr.io/charlesthomas/bitwarden-cli:2026.1.0
  26. imagePullPolicy: IfNotPresent
  27. env:
  28. - name: BW_USER
  29. valueFrom:
  30. secretKeyRef:
  31. name: bitwarden-cli
  32. key: BW_USERNAME
  33. - name: BW_PASSWORD
  34. valueFrom:
  35. secretKeyRef:
  36. name: bitwarden-cli
  37. key: BW_PASSWORD
  38. ports:
  39. - name: http
  40. containerPort: 8087
  41. protocol: TCP
  42. livenessProbe:
  43. exec:
  44. command:
  45. - wget
  46. - -q
  47. - http://127.0.0.1:8087/sync?force=true
  48. - --post-data=''
  49. initialDelaySeconds: 20
  50. failureThreshold: 3
  51. timeoutSeconds: 10
  52. periodSeconds: 120
  53. readinessProbe:
  54. tcpSocket:
  55. port: 8087
  56. initialDelaySeconds: 20
  57. failureThreshold: 3
  58. timeoutSeconds: 1
  59. periodSeconds: 10
  60. startupProbe:
  61. tcpSocket:
  62. port: 8087
  63. initialDelaySeconds: 10
  64. failureThreshold: 30
  65. timeoutSeconds: 1
  66. periodSeconds: 5
  67. ---
  68. apiVersion: v1
  69. kind: Service
  70. metadata:
  71. name: bitwarden-cli
  72. namespace: external-secrets
  73. labels:
  74. app.kubernetes.io/instance: bitwarden-cli
  75. app.kubernetes.io/name: bitwarden-cli
  76. annotations:
  77. spec:
  78. type: ClusterIP
  79. ports:
  80. - port: 8087
  81. targetPort: http
  82. protocol: TCP
  83. name: http
  84. selector:
  85. app.kubernetes.io/name: bitwarden-cli
  86. app.kubernetes.io/instance: bitwarden-cli
  87. ---
  88. kind: NetworkPolicy
  89. apiVersion: networking.k8s.io/v1
  90. metadata:
  91. namespace: external-secrets
  92. name: external-secret-2-bw-cli
  93. spec:
  94. podSelector:
  95. matchLabels:
  96. app.kubernetes.io/instance: bitwarden-cli
  97. app.kubernetes.io/name: bitwarden-cli
  98. ingress:
  99. - from:
  100. - podSelector:
  101. matchLabels:
  102. app.kubernetes.io/instance: external-secrets
  103. app.kubernetes.io/name: external-secrets