change container to use alpine instead of curl
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: nextcloud-contact-backup
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
schedule: "0 0 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 100
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: contact-backup
|
||||
image: alpine
|
||||
env:
|
||||
- name: PI_USER_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: nextcloud-credentials
|
||||
key: PI_USER_USERNAME
|
||||
- name: PI_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: nextcloud-credentials
|
||||
key: PI_USER_PASSWORD
|
||||
command: ["/bin/sh","/config/export_contacts.sh"]
|
||||
volumeMounts:
|
||||
- name: contact
|
||||
mountPath: /backup
|
||||
- name: scripts
|
||||
mountPath: /config
|
||||
volumes:
|
||||
- name: contact
|
||||
persistentVolumeClaim:
|
||||
claimName: contact
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: nextcloud-export-scripts
|
||||
# name: nextcloud-calendar-export-script
|
||||
defaultMode: 0555
|
||||
restartPolicy: Never
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: contact
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
storageClassName: nfs-backup-storage-intelligent
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
Reference in New Issue
Block a user