diff --git a/helm/longhorn.yaml b/helm/longhorn.yaml index 9c8c7a5..bd3e6f2 100644 --- a/helm/longhorn.yaml +++ b/helm/longhorn.yaml @@ -15,7 +15,7 @@ releases: chart: longhorn/longhorn values: - persistence: - defaultClass: true + defaultClass: {{ requiredEnv "HETZNER_CSI_DISABLED" }} defaultFsType: ext4 defaultClassReplicaCount: 2 - defaultSettings: diff --git a/init.tf b/init.tf index e16d02c..77ee7f7 100644 --- a/init.tf +++ b/init.tf @@ -181,6 +181,7 @@ resource "null_resource" "longhorn" { when = create command = <<-EOT export KUBECONFIG=$(readlink -f ${path.module}/kubeconfig.yaml) + export HETZNER_CSI_DISABLED=${var.disable_hetzner_csi ? "true" : "false"} helmfile -f ${path.module}/helm/longhorn.yaml apply EOT on_failure = continue