-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhelmrelease.yaml
More file actions
93 lines (91 loc) · 2.77 KB
/
Copy pathhelmrelease.yaml
File metadata and controls
93 lines (91 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/app-template-5.0.1/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: restic
namespace: zigbee2mqtt
spec:
chart:
spec:
chart: app-template
version: 5.0.1
reconcileStrategy: ChartVersion
sourceRef:
kind: HelmRepository
namespace: flux-system
name: bjw-s
interval: 1h
driftDetection:
mode: enabled
values:
defaultPodOptions:
labels:
policy.gabe565.com/egress-healthchecks: "true"
policy.gabe565.com/egress-namespace: "true"
policy.gabe565.com/egress-world: "true"
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app.kubernetes.io/name: zigbee2mqtt
controllers:
restic:
type: cronjob
cronjob:
schedule: 35 0 * * *
concurrencyPolicy: Replace
ttlSecondsAfterFinished: 3600
containers:
restic: &container
image:
repository: ghcr.io/gabe565/restic
tag: 0.19.1@sha256:fefaeca2f5da46d85b39b888e6edef66d6dbc641be9597aebf5654a2269e73b6
workingDir: /zigbee2mqtt-data
envFrom:
- secretRef:
name: restic-b2
- secretRef:
name: restic-envs
env:
TZ: America/Chicago
RESTIC_HOST:
fieldRef:
fieldPath: metadata.namespace
HC_API_URL: http://healthchecks.healthchecks:8000/ping
command:
- runitor
- --
- sh
- -c
# language=sh
- |
exec > >(ts '%H:%M:%S') 2>&1
set -eu
restic backup --tag=files .
restic forget --prune --keep-daily=90 --keep-weekly=24 --keep-monthly=24 --keep-yearly=20
restic cache --cleanup
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1000m
memory: 1Gi
init:
type: job
annotations:
helm.sh/hook: post-install
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
containers:
init:
<<: *container
command: [sh, -c, "restic init || true"]
persistence:
cache:
storageClass: longhorn-ssd
size: 1Gi
accessMode: ReadWriteOnce
zigbee2mqtt-data:
existingClaim: zigbee2mqtt-data