-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Environment:
- AKS
- Kubernetes version: 1.31.8
- Nodepool: 1
- Nodes: 2
- Node sizes: Standard_D2pds_v5 (arm64)
- Symphony: 0.48.35
Command:
helm install symphony oci://ghcr.io/eclipse-symphony/helm/symphony --version '0.48.35' --set siteId=hq
Pulled: ghcr.io/eclipse-symphony/helm/symphony:0.48.35
Digest: sha256:4e47c826460153068b4cd472d3100fe9112152170c0d07452a9762d335dc0e05
Error:
INSTALLATION FAILED: template: symphony/templates/redis.yaml:9:23: executing "symphony/templates/redis.yaml" at <include "RedisPVCStorageClassName" .>: error calling include: template: symphony/templates/symphony-core/_helpers.tpl:245:18: executing "RedisPVCStorageClassName" at <$sc.metadata.annotations>: wrong type for value; expected map[string]interface {}; got interface {}
Analysis:
This error does not happen if installing on a k3s based cluster.
In AKS, some storage classes might have null or empty annotations, which causes the helm template to fail.
On AKS cluster:
kubectl get storageclass -o json | jq -r '.items[] | "\(.metadata.name): \(if .metadata.annotations then "has-annotations" else "NULL-annotations" end)"'
azurefile: NULL-annotations
azurefile-csi: NULL-annotations
azurefile-csi-premium: NULL-annotations
azurefile-premium: NULL-annotations
default: has-annotations
managed: NULL-annotations
managed-csi: NULL-annotations
managed-csi-premium: NULL-annotations
managed-premium: NULL-annotations
Proposed fix:
Consider adding null check before accessing annotations to /packages/helm/symphony/templates/symphony-core/_helpers.tpl
{{- if and $sc.metadata.annotations (hasKey $sc.metadata.annotations "storageclass.kubernetes.io/is-default-class") -}}
Workaround:
I was able to workaround and install Symphony latest on AKS by setting the storage class
helm install symphony oci://ghcr.io/eclipse-symphony/helm/symphony --version '0.48.35' --set redis.persistentVolume.storageClass=default