weave-gitops
weave-gitops copied to clipboard
Display appVersion of Helm Release
Problem Curently, the dashboard displays the revision value of the HelmRelease. Would it be possible to display also the appVersion of the Helm Release indicated in Chart.yaml ? Chart.yaml fields : https://helm.sh/docs/topics/charts/
Flux does not track AppVersion. To get this information we would have to read the Helm secret that stores all information about the Helm release.
- Find the secret for a helm release
- Read the secret's
release
field - base64 decode the value
- Parse it as json
- Read version value from the
.chart.metadata.appVersion
path
That would require to allow reading all secrets for users. Unless someone knows an easier way to get this information.
❯ kubectl get secrets -n traefik sh.helm.release.v1.traefik.v1 -o yaml \
| yq '.data | map_values(@base64d)' \
| dasel -r yaml '.release' \
| base64 -d \
| gunzip \
| dasel -r json '.chart.metadata.appVersion'
"v2.10.1"
We might already be reading some info out of this secret to generate the inventory list in the UI?
https://github.com/weaveworks/weave-gitops/blob/08351ea31c48f0b8044f527bd2d7972aef4f3e55/core/server/helm_release.go#L21-L34
We should be able to parse it from the Secret, without much additional cost.