From 57c311d960a04fe8c460b69c7cc42bd62a410906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Heleno?= Date: Wed, 28 Aug 2024 14:48:40 +0200 Subject: [PATCH] fix: remove attribute causing issues when bootstrapping cluster When we set this, Longhorn creates a prototype StorageClass that Argo CD is then unable to update with the configurations desired, giving an error message `The StorageClass "longhorn-backup" is invalid: parameters: Forbidden: updates to parameters are forbidden.`. Removing the attribute `defaultLonghornStaticStorageClass` removes that problem while maintaining the normal behavior of the module, as the StorageClass is set as default by the annotation `storageclass.kubernetes.io/is-default-class: {{ $.Values.backups.defaultStorageClass | quote }}`. --- locals.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/locals.tf b/locals.tf index cb6093a..40f95f6 100644 --- a/locals.tf +++ b/locals.tf @@ -12,7 +12,6 @@ locals { defaultSettings = { backupTarget = var.enable_pv_backups ? format("s3://%s@%s/", var.backup_storage.bucket_name, var.backup_storage.region) : "" backupTargetCredentialSecret = var.enable_pv_backups ? "longhorn-s3-secret" : "" - defaultLonghornStaticStorageClass = var.enable_pv_backups && var.set_default_storage_class ? "longhorn-backup" : "longhorn-static" storageOverProvisioningPercentage = var.storage_over_provisioning_percentage storageMinimalAvailablePercentage = var.storage_minimal_available_percentage taintToleration = join(";", local.tolerations_list)