add longhorn operator

This commit is contained in:
Finn 2024-07-10 17:55:34 -07:00
parent 9088fad25e
commit a8eb338e86
7 changed files with 4665 additions and 0 deletions

View file

@ -1,5 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- longhorn
- postgres-operator
- cert-manager
- kube-prometheus

View file

@ -0,0 +1,12 @@
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
name: backup-nightly
namespace: longhorn-system
spec:
concurrency: 1
cron: '0 0 * * *'
groups: [default]
name: backup-nightly
retain: 2
task: backup

View file

@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: longhorn-default-setting
labels:
app.kubernetes.io/name: longhorn
app.kubernetes.io/instance: longhorn
app.kubernetes.io/version: v1.6.0
data:
default-setting.yaml: |- # reference: https://longhorn.io/docs/1.6.2/advanced-resources/deploy/customizing-default-settings/#using-the-longhorn-deployment-yaml-file
backup-target: s3://k8s-volume-backups@us-sea-1/k8s-volume-backups
priority-class: longhorn-critical
backup-target-credential-secret: minio-backup-credentials
concurrent-automatic-engine-upgrade-per-node-limit: 1

View file

@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: longhorn-system
resources:
- namespace.yaml
- config.yaml
- longhorn.yaml
- secrets.yaml
- storage-class.yaml
- backup.yaml

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: longhorn-system

View file

@ -0,0 +1,28 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: longhorn
provisioner: driver.longhorn.io
allowVolumeExpansion: true
parameters:
numberOfReplicas: "1"
staleReplicaTimeout: "2880" # 48 hours in minutes
fromBackup: ""
recurringJobs: |
[
{
"name":"snap",
"task":"snapshot",
"cron":"*/1 * * * *",
"retain":1
},
{
"name":"backup",
"task":"backup",
"cron":"*/2 * * * *",
"retain":1,
"labels": {
"interval":"2m"
}
}
]