Configure longhorn storageclasses based on the number of longhorn nodes in the cluster

What does this MR do and why?

This MR does below:

  • Calculate the number of longhorn nodes dynamically based on longhorn_disk_config defined under .Values.cluster.baremetal_host_default or .Values.cluster.baremetal_hosts in the environmental values.
  • the computation of default_longhorn_storage_class based on the number of longhorn nodes and the computation of default_storage_class to use default_longhorn_storage_class.
  • Default longhorn storage class should be set to longhorn, two-replicas-storageclass or single-replica-storageclass based on the number of longhorn nodes in the cluster.

Closes: #1714 (closed) #1856 (closed) #1460 (closed)

Test coverage

  • Deployment of Sylva with single node cluster by enabling longhorn
Edited by Mohan Sharma

Merge request reports

Loading