add longhorn operator
This commit is contained in:
parent
9088fad25e
commit
a8eb338e86
7 changed files with 4665 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- longhorn
|
||||
- postgres-operator
|
||||
- cert-manager
|
||||
- kube-prometheus
|
||||
|
|
12
k8s/operators/longhorn/backup.yaml
Normal file
12
k8s/operators/longhorn/backup.yaml
Normal 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
|
14
k8s/operators/longhorn/config.yaml
Normal file
14
k8s/operators/longhorn/config.yaml
Normal 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
|
10
k8s/operators/longhorn/kustomization.yaml
Normal file
10
k8s/operators/longhorn/kustomization.yaml
Normal 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
|
4595
k8s/operators/longhorn/longhorn.yaml
Normal file
4595
k8s/operators/longhorn/longhorn.yaml
Normal file
File diff suppressed because it is too large
Load diff
4
k8s/operators/longhorn/namespace.yaml
Normal file
4
k8s/operators/longhorn/namespace.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: longhorn-system
|
28
k8s/operators/longhorn/storage-class.yaml
Normal file
28
k8s/operators/longhorn/storage-class.yaml
Normal 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"
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue