bitwarden-cli.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. - name: BW_CLIENTSECRET
  39. valueFrom:
  40. secretKeyRef:
  41. name: bitwarden-cli
  42. key: BW_CLIENTSECRET
  43. ports:
  44. - name: http
  45. containerPort: 8087
  46. protocol: TCP
  47. livenessProbe:
  48. exec:
  49. command:
  50. - wget
  51. - -q
  52. - http://127.0.0.1:8087/sync?force=true
  53. - --post-data=''
  54. initialDelaySeconds: 20
  55. failureThreshold: 3
  56. timeoutSeconds: 10
  57. periodSeconds: 120
  58. readinessProbe:
  59. tcpSocket:
  60. port: 8087
  61. initialDelaySeconds: 20
  62. failureThreshold: 3
  63. timeoutSeconds: 1
  64. periodSeconds: 10
  65. startupProbe:
  66. tcpSocket:
  67. port: 8087
  68. initialDelaySeconds: 10
  69. failureThreshold: 30
  70. timeoutSeconds: 1
  71. periodSeconds: 5
  72. ---
  73. apiVersion: v1
  74. kind: Service
  75. metadata:
  76. name: bitwarden-cli
  77. namespace: external-secrets
  78. labels:
  79. app.kubernetes.io/instance: bitwarden-cli
  80. app.kubernetes.io/name: bitwarden-cli
  81. annotations:
  82. spec:
  83. type: ClusterIP
  84. ports:
  85. - port: 8087
  86. targetPort: http
  87. protocol: TCP
  88. name: http
  89. selector:
  90. app.kubernetes.io/name: bitwarden-cli
  91. app.kubernetes.io/instance: bitwarden-cli
  92. ---
  93. kind: NetworkPolicy
  94. apiVersion: networking.k8s.io/v1
  95. metadata:
  96. namespace: external-secrets
  97. name: external-secret-2-bw-cli
  98. spec:
  99. podSelector:
  100. matchLabels:
  101. app.kubernetes.io/instance: bitwarden-cli
  102. app.kubernetes.io/name: bitwarden-cli
  103. ingress:
  104. - from:
  105. - podSelector:
  106. matchLabels:
  107. app.kubernetes.io/instance: external-secrets
  108. app.kubernetes.io/name: external-secrets