Allow Longhorn and Hetzner CSI to live side by side, since Hetzner CSI takes over as default - we don't want Longhorn to also be default (It'll pick Hetzner simply because H comes before L)

This commit is contained in:
Michael Karbowiak 2022-05-02 16:32:21 +02:00
parent f905b68e7c
commit 547ca6d29b
2 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ releases:
chart: longhorn/longhorn
values:
- persistence:
defaultClass: true
defaultClass: {{ requiredEnv "HETZNER_CSI_DISABLED" }}
defaultFsType: ext4
defaultClassReplicaCount: 2
- defaultSettings:

View File

@ -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