Use remote longhorn yaml
This commit is contained in:
parent
d6fac56f2e
commit
3cd43008f2
6 changed files with 72 additions and 4612 deletions
10
k8s/operators/longhorn/config-patches.yaml
Normal file
10
k8s/operators/longhorn/config-patches.yaml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
- op: replace
|
||||||
|
path: /data/default-setting.yaml
|
||||||
|
value: |
|
||||||
|
priority-class: longhorn-critical # default
|
||||||
|
|
||||||
|
# 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
|
|
@ -1,14 +0,0 @@
|
||||||
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
|
|
16
k8s/operators/longhorn/ingress.yaml
Normal file
16
k8s/operators/longhorn/ingress.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: longhorn-frontend-internal
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: longhorn.longhorn-system.k8s
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: longhorn-frontend
|
||||||
|
port:
|
||||||
|
number: 80
|
|
@ -2,9 +2,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: longhorn-system
|
namespace: longhorn-system
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- https://github.com/longhorn/longhorn/releases/download/v1.6.2/longhorn.yaml
|
||||||
- config.yaml
|
|
||||||
- longhorn.yaml
|
|
||||||
- secrets.yaml
|
- secrets.yaml
|
||||||
- storage-class.yaml
|
- storage-class.yaml
|
||||||
- backup.yaml
|
- backup.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
patches:
|
||||||
|
- path: config-patches.yaml
|
||||||
|
target:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: longhorn-default-setting
|
||||||
|
- path: longhorn-storageclass-patches.yaml
|
||||||
|
target:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: longhorn-storageclass
|
||||||
|
|
35
k8s/operators/longhorn/longhorn-storageclass-patches.yaml
Normal file
35
k8s/operators/longhorn/longhorn-storageclass-patches.yaml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
- op: replace
|
||||||
|
path: /data/storageclass.yaml
|
||||||
|
value: |
|
||||||
|
kind: StorageClass
|
||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: longhorn
|
||||||
|
annotations:
|
||||||
|
storageclass.kubernetes.io/is-default-class: "true"
|
||||||
|
provisioner: driver.longhorn.io
|
||||||
|
allowVolumeExpansion: true
|
||||||
|
reclaimPolicy: "Delete"
|
||||||
|
volumeBindingMode: Immediate
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue