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 chart: longhorn/longhorn
values: values:
- persistence: - persistence:
defaultClass: true defaultClass: {{ requiredEnv "HETZNER_CSI_DISABLED" }}
defaultFsType: ext4 defaultFsType: ext4
defaultClassReplicaCount: 2 defaultClassReplicaCount: 2
- defaultSettings: - defaultSettings:

View File

@ -181,6 +181,7 @@ resource "null_resource" "longhorn" {
when = create when = create
command = <<-EOT command = <<-EOT
export KUBECONFIG=$(readlink -f ${path.module}/kubeconfig.yaml) 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 helmfile -f ${path.module}/helm/longhorn.yaml apply
EOT EOT
on_failure = continue on_failure = continue