From c6714bbaacbf9d8263fa0b3162e1272a542c91e7 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Thu, 16 Nov 2023 05:38:06 -0500 Subject: [PATCH] feat(borg-server) add borg-server (#14663) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** A borg Backup server ⚒️ Fixes # **⚙️ Type of change** - [X] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [X] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [X] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/incubator/borg-server/.helmignore | 30 ++++++ charts/incubator/borg-server/CHANGELOG.md | 1 + charts/incubator/borg-server/Chart.yaml | 27 +++++ charts/incubator/borg-server/README.md | 1 + charts/incubator/borg-server/icon.png | Bin 0 -> 1505 bytes charts/incubator/borg-server/questions.yaml | 94 ++++++++++++++++++ .../incubator/borg-server/templates/NOTES.txt | 1 + .../borg-server/templates/common.yaml | 1 + charts/incubator/borg-server/values.yaml | 43 ++++++++ 9 files changed, 198 insertions(+) create mode 100644 charts/incubator/borg-server/.helmignore create mode 100644 charts/incubator/borg-server/CHANGELOG.md create mode 100644 charts/incubator/borg-server/Chart.yaml create mode 100644 charts/incubator/borg-server/README.md create mode 100644 charts/incubator/borg-server/icon.png create mode 100644 charts/incubator/borg-server/questions.yaml create mode 100644 charts/incubator/borg-server/templates/NOTES.txt create mode 100644 charts/incubator/borg-server/templates/common.yaml create mode 100644 charts/incubator/borg-server/values.yaml diff --git a/charts/incubator/borg-server/.helmignore b/charts/incubator/borg-server/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/borg-server/.helmignore @@ -0,0 +1,30 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/borg-server/CHANGELOG.md b/charts/incubator/borg-server/CHANGELOG.md new file mode 100644 index 00000000000..825c32f0d03 --- /dev/null +++ b/charts/incubator/borg-server/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/charts/incubator/borg-server/Chart.yaml b/charts/incubator/borg-server/Chart.yaml new file mode 100644 index 00000000000..29af72066ea --- /dev/null +++ b/charts/incubator/borg-server/Chart.yaml @@ -0,0 +1,27 @@ +apiVersion: v2 +appVersion: "2.1.1" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 14.3.5 +deprecated: false +description: A borg Backup server +home: https://truecharts.org/charts/incubator/borg-server +icon: https://truecharts.org/img/hotlink-ok/chart-icons/borg-server.png +keywords: + - borg-server + - backup +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: borg-server +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/borg-server + - https://github.com/AnotherStranger/docker-borg-backup +type: application +version: 0.0.1 +annotations: + truecharts.org/category: backup + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/borg-server/README.md b/charts/incubator/borg-server/README.md new file mode 100644 index 00000000000..7e59600739c --- /dev/null +++ b/charts/incubator/borg-server/README.md @@ -0,0 +1 @@ +# README diff --git a/charts/incubator/borg-server/icon.png b/charts/incubator/borg-server/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..71171820cdd178f1bdbfe72241acb57b98cfe4f5 GIT binary patch literal 1505 zcmZXUSx}P)6on7SDsCVNic3)gYVu=Uuu~&iMFJXyvY7CLMM7c}NYSDqh$y%KVn78o zDj=vBBk%_k2vu5_xCARv*_jfSR>UfZ3ofPb11o?)AQ&KlP#_G500e*-SO-J_5?}+c2}lG|fSo`ZkPc)3dx1<~A0P#?fP+8| zkP93F4g*I38E_QH15N;iKoM{fFi|K5&H!@YET90+0i^&1lmlv@0;mKuKs9g)&;r+h z8$b>43!n$?0{4JApdM%d8i6LD8E6IC00YntbO4<&8jS-%Y12*g&4kN+y%Ss8dwfjT z8OyvEuS_&N?dT0@TI5)BUn91+xJkQdIm*%g+V&-*ez4{&vWP1?J$Z)9jFxwAhriLt zZ(mMu>t%3WeOh?r-sZf889zooE_vXxXOx%Cr2mb5N*U3XJKy85c-%5qhcaHy_AMDR zm{$fIRaxrX5*mGZwqmC^>xj4V1sOAWI3c2XqItXI>(72RJ(RVoW~ImHOF3^k|Fni# z6Lg_TJG+K^P?q{ovbUknC8W!ECAl?yTc>56d&cqNq{Y7lejDfYAgE2N*fOxV@I&CS z#I}#U#VPkk#(JE(I@{+o~6%1x>2^&$MeMf8zdNkQKUvv=hGI?h}YQKWcs=ZSZ0q}nX$dP3cH|E4C{kbd^X2~KJs znv@rlUbvb4(?{xEk~Nu5uA)+D+M%S`f6H}lh&Ay_amv?@G}ENg7JXh0Sr6Zj_q;5h z8Ei+q3ePy6S1PD_of99sfoi1tQRGIgIbD@%NeImB$bY3SJHDq>vF&w7cI$OvXEj%~ zHdYwkCd*IhTeTs&YR(z{`sB*MgiBLXGP|6%wX7MKH+6)yATdd0S5Z zF~#@%s`2@xe_wiX$043}(C~C?xIXO$v$A5Rys6Z@HR;0ha2F@5vX0uJG9T6s;wtUD zYvfj{UvN82Em9`rtQ%8(l3dMNPM+p>kQ$moClaqJh*DjAd-JYOx2~HS<4$L__j{-5 zjO+cxLS5MNo&!0J-KO8zMi%h9mY|K2gS?pD%@ioG0(-&)~<-A9$v+?}PGicC&) zXWh-gNB0bYowEitO9?|QQx;M7SG?JPpjY`J%#khJVTN{+vGxtCzq-$Q;> AqyPW_ literal 0 HcmV?d00001 diff --git a/charts/incubator/borg-server/questions.yaml b/charts/incubator/borg-server/questions.yaml new file mode 100644 index 00000000000..465b578dba6 --- /dev/null +++ b/charts/incubator/borg-server/questions.yaml @@ -0,0 +1,94 @@ +# Include{groups} +portals: {} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} + +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} + + +# Include{containerBasic} +# Include{containerAdvanced} + +# Include{containerConfig} +# Include{podOptions} +# Include{serviceRoot} +# Include{serviceMain} +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: main + label: "Main Service Port Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: "Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 8022 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: borg + label: "App Borg Storage" + description: "Stores the Application Borg." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: backups + label: "App Backups Storage" + description: "Stores the Application Backups." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: ssh + label: "App SSH Storage" + description: "Stores the Application SSH." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceList} +# Include{securityContextRoot} + + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID of the user running the application" + schema: + type: int + default: 0 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 + +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/borg-server/templates/NOTES.txt b/charts/incubator/borg-server/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/borg-server/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/borg-server/templates/common.yaml b/charts/incubator/borg-server/templates/common.yaml new file mode 100644 index 00000000000..b51394e00a4 --- /dev/null +++ b/charts/incubator/borg-server/templates/common.yaml @@ -0,0 +1 @@ +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/borg-server/values.yaml b/charts/incubator/borg-server/values.yaml new file mode 100644 index 00000000000..a958423de9c --- /dev/null +++ b/charts/incubator/borg-server/values.yaml @@ -0,0 +1,43 @@ +image: + repository: ghcr.io/anotherstranger/borg-server + pullPolicy: IfNotPresent + tag: 2.1.1@sha256:768c3522f846d8e8476a1f6527b5c0ff8c021dc31b7988876d34228ebdc7976e + +securityContext: + container: + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 + +service: + main: + ports: + main: + protocol: tcp + targetPort: 22 + port: 8022 + +workload: + main: + podSpec: + containers: + main: + env: + BORG_UID: "{{ .Values.securityContext.container.PUID }}" + BORG_GID: "{{ .Values.securityContext.pod.fsGroup }}" + + +persistence: + borg: + enabled: true + mountPath: "/var/lib/docker-borg" + backups: + enabled: true + mountPath: "/home/borg/backups" + ssh: + enabled: true + mountPath: "/home/borg/.ssh" + +portal: + open: + enabled: false