custom longhorn storage class
This commit is contained in:
@@ -61,10 +61,9 @@ spec:
|
||||
# чтобы не разъезжались реплики при 3 нодах
|
||||
replicaSoftAntiAffinity: false
|
||||
persistence:
|
||||
defaultClass: true
|
||||
defaultClassReplicaCount: 3
|
||||
defaultFsType: ext4
|
||||
reclaimPolicy: Retain
|
||||
# the default "longhorn" StorageClass lives in ../storage-classes/longhorn.yaml -
|
||||
# the chart hardcodes staleReplicaTimeout: "30" and offers no value to override it
|
||||
createStorageClass: false
|
||||
csi:
|
||||
attacherReplicaCount: 3
|
||||
provisionerReplicaCount: 3
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- longhorn.yaml
|
||||
- longhorn-no-retain.yaml
|
||||
- longhorn-single-replica.yaml
|
||||
|
||||
@@ -4,9 +4,11 @@ metadata:
|
||||
name: longhorn-no-retain
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
# StorageClass parameters are immutable - let Flux recreate the object on change
|
||||
kustomize.toolkit.fluxcd.io/force: enabled
|
||||
provisioner: driver.longhorn.io
|
||||
reclaimPolicy: Delete
|
||||
allowVolumeExpansion: true
|
||||
parameters:
|
||||
numberOfReplicas: "3"
|
||||
staleReplicaTimeout: "30"
|
||||
staleReplicaTimeout: "2880"
|
||||
|
||||
@@ -4,9 +4,11 @@ metadata:
|
||||
name: longhorn-single-replica
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
# StorageClass parameters are immutable - let Flux recreate the object on change
|
||||
kustomize.toolkit.fluxcd.io/force: enabled
|
||||
provisioner: driver.longhorn.io
|
||||
reclaimPolicy: Retain
|
||||
allowVolumeExpansion: true
|
||||
parameters:
|
||||
numberOfReplicas: "1"
|
||||
staleReplicaTimeout: "30"
|
||||
staleReplicaTimeout: "2880"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Default Longhorn class. Managed here instead of by the chart (persistence.createStorageClass: false
|
||||
# in the HelmRelease) because the chart hardcodes staleReplicaTimeout: "30".
|
||||
# Parameters otherwise mirror what chart 1.12.1 rendered.
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: longhorn
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "true"
|
||||
# StorageClass parameters are immutable - let Flux recreate the object on change
|
||||
kustomize.toolkit.fluxcd.io/force: enabled
|
||||
provisioner: driver.longhorn.io
|
||||
reclaimPolicy: Retain
|
||||
allowVolumeExpansion: true
|
||||
volumeBindingMode: Immediate
|
||||
parameters:
|
||||
numberOfReplicas: "3"
|
||||
# minutes a failed replica is kept for reuse before it is discarded and fully rebuilt;
|
||||
# 30 was shorter than a planned node shutdown and caused a ~1.2TB full rebuild of kube-3
|
||||
staleReplicaTimeout: "1440"
|
||||
fromBackup: ""
|
||||
fsType: ext4
|
||||
dataLocality: disabled
|
||||
unmapMarkSnapChainRemoved: ignored
|
||||
disableRevisionCounter: "true"
|
||||
dataEngine: v1
|
||||
backupTargetName: default
|
||||
Reference in New Issue
Block a user