Issue Description
1. When creating a new cluster and specifying package deployment in Kublr cluster specification, if the helm chart depends on StorageClass, the chart is not deployed properly.
2. Helm chart is stuck waiting on StorageClass with all other conditions being OK.
Background
All user packages defined in the Kublr cluster specification are deployed in parallel to the other Kublr features.
As the result, helm package might be installed before the actual default StorageClass is deployed by Kublr.
Issue example:
If StorageClass dependant Helm chart (e.g. wordpress) is defined in the Kublr cluster specification with cluster bootstrap (initial creation) – Helm chart fails (but showing green in Kublr user interface).
Kublr cluster specification with wordpress package/helm example:
packages: wordpress: chart: name: wordpress repoUrl: 'https://charts.bitnami.com/bitnami' version: 15.2.2 helmVersion: v3.9.1 namespace: wordpress releaseName: wordpress
Error is related to the issue that Default storageClass (kublr-system) is not yet created when wordpress is deployed:
ubuntu@master# kubectl get pvc --all-namespaces ... wordpress data-wordpress-mariadb-0 Pending 50m wordpress wordpress Pending
Solutions
Option 1. Define storageClass for all packages in Kublr cluster specification.
Define storageClass: kublr-system for helm charts/packages when you first create the cluster from Kublr.
Example:
packages: wordpress: chart: name: wordpress repoUrl: 'https://charts.bitnami.com/bitnami' version: 15.2.2 helmVersion: v3.9.1 namespace: wordpress releaseName: wordpress values: global: storageClass: kublr-system persistence: storageClass: kublr-system
Option 2. Add package/helm AFTER cluster was already created.
This prevents the issue, as the default StorageClass is already existing in the cluster, so all StorageClass dependent Helm charts can be deployed properly.