Skip to content

Commit

Permalink
fix: remove attribute causing issues when bootstrapping cluster
Browse files Browse the repository at this point in the history
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 }}`.
  • Loading branch information
lentidas committed Sep 4, 2024
1 parent 4a441d2 commit 57c311d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 57c311d

Please sign in to comment.