Split helmfile into components

This commit is contained in:
Grant
2025-05-19 14:09:30 -06:00
parent 12bcabf7b2
commit dca9e445c2
20 changed files with 246 additions and 491 deletions

View File

@@ -1,6 +0,0 @@
apiVersion: v2
name: k8up-backup
description: A Helm chart for a k8up backup
type: application
version: 0.0.3

View File

@@ -1,23 +0,0 @@
# {{- if .Values.oneTimeBackup }}
apiVersion: k8up.io/v1
kind: Backup
metadata:
name: {{ .Release.Name }}
spec:
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 2
backend:
repoPasswordSecretRef:
name: "{{ .Release.Name }}-repopassword"
key: password
s3:
endpoint: "{{ .Values.endpoint }}"
bucket: "{{ .Values.bucket }}"
accessKeyIDSecretRef:
name: "{{ .Release.Name }}-credentials"
key: id
secretAccessKeySecretRef:
name: "{{ .Release.Name }}-credentials"
key: key
# {{- end }}

View File

@@ -1,35 +0,0 @@
# {{- if not .Values.oneTimeBackup }}
apiVersion: k8up.io/v1
kind: Schedule
metadata:
name: "{{ .Release.Name }}-schedule"
spec:
backend:
repoPasswordSecretRef:
name: "{{ .Release.Name }}-repopassword"
key: password
s3:
endpoint: "{{ .Values.endpoint }}"
bucket: "{{ .Values.bucket }}"
accessKeyIDSecretRef:
name: "{{ .Release.Name }}-credentials"
key: id
secretAccessKeySecretRef:
name: "{{ .Release.Name }}-credentials"
key: key
backup:
schedule: '@hourly-random'
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 1
check:
schedule: '@daily-random'
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 1
prune:
schedule: '@weekly-random'
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 1
retention:
keepLast: 5
keep Daily: 14
# {{- end }}

View File

@@ -1,14 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: "{{ .Release.Name }}-credentials"
data:
id: "{{ .Values.credentials.id | b64enc}}"
key: "{{ .Values.credentials.key | b64enc}}"
---
apiVersion: v1
kind: Secret
metadata:
name: "{{ .Release.Name }}-repopassword"
data:
password: "{{ .Values.repoPassword | b64enc}}"

View File

@@ -1,8 +0,0 @@
# endpoint:
# bucket
# repoPassword:
# credentials:
# id:
# key:
oneTimeBackup: false

View File

@@ -0,0 +1,8 @@
endpoint: hel1.your-objectstorage.com
bucket: fog
credentials:
id: {{ requiredEnv "HETZNER_S3_ACCESS_KEY" }}
key: {{ requiredEnv "HETZNER_S3_ACCESS_SECRET" }}
repoPassword: {{ requiredEnv "k8UP_REPO_PASSWORD" }}

View File

@@ -1,3 +0,0 @@
endpoint: hel1.your-objectstorage.com
bucket: fog