use configmap to run the script
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
@@ -4,7 +4,7 @@ data:
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
bw config server https://bitwarden.tryton.geeraert.eu/
|
bw config server https://bitwarden.tryton.geeraert.eu/
|
||||||
export BW_key=$(bw login valvankart@orange.fr Impreza555 --raw)
|
export BW_key=$(bw login valvankart@orange.fr Impreza555 --raw)
|
||||||
bw list items --session $BW_key >> /tmp/backup.json
|
bw list items --session $BW_key >> /backup/backup_$(date "+%Y-%m-%d_%Hh-%m").json
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- "-c"
|
- "-c"
|
||||||
- "bw config server https://bitwarden.tryton.geeraert.eu/"
|
- "/config/export_bitwarden.sh"
|
||||||
- "export BW_key=$(bw login valvankart@orange.fr Impreza555 --raw)"
|
|
||||||
- "sleep 3600"
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: scripts
|
- name: scripts
|
||||||
mountPath: /config
|
mountPath: /config
|
||||||
|
- name: bitwarden-vault-backup
|
||||||
|
mountPath: /backup
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
name: debian
|
name: debian
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
@@ -28,3 +28,24 @@ spec:
|
|||||||
configMap:
|
configMap:
|
||||||
name: bitwarden-export-scripts
|
name: bitwarden-export-scripts
|
||||||
defaultMode: 0555
|
defaultMode: 0555
|
||||||
|
- name: bitwarden-vault-backup
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: bitwarden-vault-backup
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: bitwarden-vault-backup
|
||||||
|
namespace: bwbackup
|
||||||
|
annotations:
|
||||||
|
fileType: Backup
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-storage-fastaccess
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user