bitwarden-cli.yaml 2.9 KB

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