mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-14 11:57:59 +00:00
bb63bad38c
Whilst implementing integration with Vaultwarden I noticed that the local vault was not being updated. I had to add "force=true" to the sync api call for it to work as expected. Signed-off-by: Gary Hodgson <gary.s.hodgson@gmail.com>
110 lines
2.7 KiB
YAML
110 lines
2.7 KiB
YAML
{% raw %}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: bitwarden-cli
|
|
namespace: bitwarden
|
|
labels:
|
|
app.kubernetes.io/instance: bitwarden-cli
|
|
app.kubernetes.io/name: bitwarden-cli
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: bitwarden-cli
|
|
app.kubernetes.io/instance: bitwarden-cli
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: bitwarden-cli
|
|
app.kubernetes.io/instance: bitwarden-cli
|
|
spec:
|
|
containers:
|
|
- name: bitwarden-cli
|
|
image: YOUR_BITWARDEN_CLI_IMAGE
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: BW_HOST
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: bitwarden-cli
|
|
key: BW_HOST
|
|
- name: BW_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: bitwarden-cli
|
|
key: BW_USERNAME
|
|
- name: BW_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: bitwarden-cli
|
|
key: BW_PASSWORD
|
|
ports:
|
|
- name: http
|
|
containerPort: 8087
|
|
protocol: TCP
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- wget
|
|
- -q
|
|
- http://127.0.0.1:8087/sync?force=true
|
|
- --post-data=''
|
|
initialDelaySeconds: 20
|
|
failureThreshold: 3
|
|
timeoutSeconds: 1
|
|
periodSeconds: 120
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 8087
|
|
initialDelaySeconds: 20
|
|
failureThreshold: 3
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
startupProbe:
|
|
tcpSocket:
|
|
port: 8087
|
|
initialDelaySeconds: 10
|
|
failureThreshold: 30
|
|
timeoutSeconds: 1
|
|
periodSeconds: 5
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: bitwarden-cli
|
|
namespace: bitwarden
|
|
labels:
|
|
app.kubernetes.io/instance: bitwarden-cli
|
|
app.kubernetes.io/name: bitwarden-cli
|
|
annotations:
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 8087
|
|
targetPort: http
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app.kubernetes.io/name: bitwarden-cli
|
|
app.kubernetes.io/instance: bitwarden-cli
|
|
---
|
|
kind: NetworkPolicy
|
|
apiVersion: networking.k8s.io/v1
|
|
metadata:
|
|
namespace: bitwarden
|
|
name: external-secret-2-bw-cli
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/instance: bitwarden-cli
|
|
app.kubernetes.io/name: bitwarden-cli
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/instance: external-secrets
|
|
app.kubernetes.io/name: external-secrets
|
|
{% endraw %}
|