From a270571e7d7e9931bcb028378234759afb5a98ee Mon Sep 17 00:00:00 2001 From: auricom <27022259+auricom@users.noreply.github.com> Date: Wed, 13 Jul 2022 19:55:08 +0200 Subject: [PATCH] fix: add borgbackup --- .../apps/data/borgserver/helm-release.yaml | 83 +++++++++++++++++++ .../apps/data/borgserver/kustomization.yaml | 4 + cluster/apps/data/kustomization.yaml | 1 + .../settings/cluster-settings.yaml | 1 + 4 files changed, 89 insertions(+) create mode 100644 cluster/apps/data/borgserver/helm-release.yaml create mode 100644 cluster/apps/data/borgserver/kustomization.yaml diff --git a/cluster/apps/data/borgserver/helm-release.yaml b/cluster/apps/data/borgserver/helm-release.yaml new file mode 100644 index 000000000..2cce4e228 --- /dev/null +++ b/cluster/apps/data/borgserver/helm-release.yaml @@ -0,0 +1,83 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: &app borgserver + namespace: data +spec: + interval: 15m + chart: + spec: + chart: kah-common-chart + version: 1.1.2 + sourceRef: + kind: HelmRepository + name: k8s-at-home-charts + namespace: flux-system + interval: 15m + install: + createNamespace: true + remediation: + retries: 5 + upgrade: + remediation: + retries: 5 + values: + global: + nameOverride: *app + + image: + repository: ghcr.io/auricom/borgserver + tag: v1.2.1@sha256:7516e8af4caadaf98d6cc30c9162808819cf3fe44e11831b9a123dad83dc244c + + podAnnotations: + secret.reloader.stakater.com/reload: *app + + persistence: + backups: + enabled: true + type: nfs + server: "${LOCAL_LAN_TRUENAS}" + path: /mnt/storage/backups/apps/borgserver/backups + mountPath: /backups + keys: + enabled: true + type: nfs + server: "${LOCAL_LAN_TRUENAS}" + path: /mnt/storage/backups/apps/borgserver/keys + mountPath: /keys + + service: + main: + ports: + http: + enabled: false + ssh: + enabled: true + port: 22 + protocol: TCP + type: LoadBalancer + externalIPs: + - ${CLUSTER_LB_BORGSERVER} + externalTrafficPolicy: Local + + ingress: + main: + enabled: true + ingressClassName: "nginx" + annotations: + external-dns.alpha.kubernetes.io/target: "services.${SECRET_DOMAIN}." + external-dns/is-public: "true" + hosts: + - host: &host "{{ .Release.Name }}.${SECRET_CLUSTER_DOMAIN}" + paths: + - path: / + pathType: Prefix + tls: + - hosts: + - *host + + resources: + requests: + cpu: 100m + memory: 256Mi diff --git a/cluster/apps/data/borgserver/kustomization.yaml b/cluster/apps/data/borgserver/kustomization.yaml new file mode 100644 index 000000000..34a8531ce --- /dev/null +++ b/cluster/apps/data/borgserver/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - helm-release.yaml diff --git a/cluster/apps/data/kustomization.yaml b/cluster/apps/data/kustomization.yaml index f3444aa71..854cf9427 100644 --- a/cluster/apps/data/kustomization.yaml +++ b/cluster/apps/data/kustomization.yaml @@ -4,6 +4,7 @@ kind: Kustomization resources: - namespace.yaml - bookstack + - borgserver - freshrss - homer - jobs diff --git a/cluster/configuration/settings/cluster-settings.yaml b/cluster/configuration/settings/cluster-settings.yaml index a9ab3402f..907d2eee4 100644 --- a/cluster/configuration/settings/cluster-settings.yaml +++ b/cluster/configuration/settings/cluster-settings.yaml @@ -16,6 +16,7 @@ data: CLUSTER_LB_LOKI_SYSLOG: 192.168.169.108 CLUSTER_LB_EMQX: 192.168.169.109 CLUSTER_LB_TDARR: 192.168.169.110 + CLUSTER_LB_BORGSERVER: 192.168.169.111 LOCAL_LAN: 192.168.8.0/22 LOCAL_LAN_OPNSENSE: 192.168.8.1 LOCAL_LAN_TRUENAS: 192.168.9.10