138 lines
3.1 KiB
YAML
138 lines
3.1 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: backup-system
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: duplicati-config
|
|
namespace: backup-system
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
storageClassName: longhorn
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: duplicati
|
|
namespace: backup-system
|
|
labels:
|
|
app.kubernetes.io/name: duplicati
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: duplicati
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: duplicati
|
|
spec:
|
|
containers:
|
|
- name: duplicati
|
|
image: lscr.io/linuxserver/duplicati:latest
|
|
env:
|
|
- name: PUID
|
|
value: "0"
|
|
- name: PGID
|
|
value: "0"
|
|
- name: TZ
|
|
value: Europe/Budapest
|
|
- name: SETTINGS_ENCRYPTION_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: duplicati
|
|
key: encyptionkey
|
|
- name: DUPLICATI__WEBSERVICE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: duplicati
|
|
key: webpassword
|
|
ports:
|
|
- containerPort: 8200
|
|
name: http
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /config
|
|
- name: source
|
|
mountPath: /source
|
|
readOnly: true
|
|
- name: backup
|
|
mountPath: /backup
|
|
- name: home
|
|
mountPath: /source_home
|
|
- name: orsi
|
|
mountPath: /source_orsi
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: "2"
|
|
memory: 1Gi
|
|
volumes:
|
|
- name: config
|
|
persistentVolumeClaim:
|
|
claimName: duplicati-config
|
|
- name: source
|
|
hostPath:
|
|
path: /mnt/4_hdd/data
|
|
type: Directory
|
|
- name: backup
|
|
hostPath:
|
|
path: /mnt/2_hdd/Backup
|
|
type: Directory
|
|
- name: home
|
|
hostPath:
|
|
path: /home
|
|
type: Directory
|
|
- name: orsi
|
|
hostPath:
|
|
path: /mnt/4_hdd/orsi
|
|
type: Directory
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: duplicati
|
|
namespace: backup-system
|
|
annotations:
|
|
external-dns.alpha.kubernetes.io/hostname: duplicati.home
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 8200
|
|
targetPort: http
|
|
name: http
|
|
selector:
|
|
app.kubernetes.io/name: duplicati
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: duplicati
|
|
namespace: backup-system
|
|
annotations:
|
|
external-dns.alpha.kubernetes.io/hostname: duplicati.home
|
|
spec:
|
|
ingressClassName: nginx-internal
|
|
rules:
|
|
- host: duplicati.home
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: duplicati
|
|
port:
|
|
number: 8200
|