81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
name: longhorn-retain
|
|
annotations:
|
|
storageclass.kubernetes.io/is-default-class: "false"
|
|
provisioner: driver.longhorn.io
|
|
allowVolumeExpansion: true
|
|
parameters:
|
|
numberOfReplicas: "2"
|
|
staleReplicaTimeout: "2880"
|
|
fromBackup: ""
|
|
fsType: "xfs"
|
|
dataLocality: "best-effort"
|
|
reclaimPolicy: Retain
|
|
volumeBindingMode: Immediate
|
|
---
|
|
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
name: longhorn-delete
|
|
annotations:
|
|
storageclass.kubernetes.io/is-default-class: "false"
|
|
provisioner: driver.longhorn.io
|
|
allowVolumeExpansion: true
|
|
parameters:
|
|
numberOfReplicas: "2"
|
|
staleReplicaTimeout: "2880"
|
|
fromBackup: ""
|
|
fsType: "xfs"
|
|
dataLocality: "best-effort"
|
|
reclaimPolicy: Delete
|
|
volumeBindingMode: Immediate
|
|
---
|
|
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
name: longhorn-single-delete
|
|
annotations:
|
|
storageclass.kubernetes.io/is-default-class: "false"
|
|
provisioner: driver.longhorn.io
|
|
allowVolumeExpansion: true
|
|
parameters:
|
|
numberOfReplicas: "1"
|
|
staleReplicaTimeout: "2880"
|
|
fromBackup: ""
|
|
fsType: "xfs"
|
|
dataLocality: "best-effort"
|
|
reclaimPolicy: Delete
|
|
volumeBindingMode: Immediate
|
|
---
|
|
# Redis-specific StorageClass
|
|
# Single replica as Redis handles replication at application level
|
|
# Note: volumeBindingMode is immutable after creation
|
|
# If this StorageClass already exists with matching configuration, Flux reconciliation
|
|
# may show an error but it's harmless - the existing StorageClass will continue to work.
|
|
# For new clusters, this will be created correctly.
|
|
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
name: longhorn-redis
|
|
annotations:
|
|
storageclass.kubernetes.io/is-default-class: "false"
|
|
provisioner: driver.longhorn.io
|
|
allowVolumeExpansion: true
|
|
parameters:
|
|
# Single replica as Redis handles replication at application level
|
|
numberOfReplicas: "1"
|
|
staleReplicaTimeout: "2880"
|
|
fsType: "xfs" # xfs to match existing Longhorn volumes
|
|
dataLocality: "strict-local" # Keep Redis data local to node
|
|
# Integrate with existing S3 backup infrastructure
|
|
recurringJobSelector: |
|
|
[
|
|
{
|
|
"name":"longhorn-s3-backup",
|
|
"isGroup":true
|
|
}
|
|
]
|
|
reclaimPolicy: Delete
|
|
volumeBindingMode: Immediate |