2026-07-15 14:53:16 -07:00
|
|
|
# Longhorn StorageClasses — app-specific variants only.
|
|
|
|
|
#
|
|
|
|
|
# The cluster-wide default `longhorn` SC is intentionally NOT managed here.
|
|
|
|
|
# It is owned by Longhorn's own setting-controller (reconciled from the
|
|
|
|
|
# `longhorn-storageclass` ConfigMap in longhorn-system, stamped with the
|
|
|
|
|
# `longhorn.io/last-applied-configmap` annotation). Managing it in Terraform
|
|
|
|
|
# caused a dual-ownership fight: TF strips the annotation, Longhorn re-adds it
|
|
|
|
|
# and delete+recreates the SC (params are immutable), racing TF's post-apply
|
|
|
|
|
# read ("Root object present, but now absent"). Longhorn recreates it
|
|
|
|
|
# automatically on any cluster, so it needs no TF representation.
|
2026-07-15 12:22:35 -07:00
|
|
|
|
|
|
|
|
resource "kubernetes_storage_class" "longhorn_kafka" {
|
|
|
|
|
metadata {
|
|
|
|
|
name = "longhorn-kafka"
|
|
|
|
|
}
|
|
|
|
|
storage_provisioner = "driver.longhorn.io"
|
|
|
|
|
reclaim_policy = "Delete"
|
|
|
|
|
allow_volume_expansion = true
|
|
|
|
|
volume_binding_mode = "Immediate"
|
|
|
|
|
|
|
|
|
|
parameters = {
|
|
|
|
|
numberOfReplicas = "3"
|
|
|
|
|
staleReplicaTimeout = "30"
|
|
|
|
|
fromBackup = ""
|
|
|
|
|
fsType = "ext4"
|
|
|
|
|
dataLocality = "disabled"
|
|
|
|
|
}
|
|
|
|
|
}
|