weave-gitops icon indicating copy to clipboard operation
weave-gitops copied to clipboard

Display appVersion of Helm Release

Open jnbptstm opened this issue 1 year ago • 3 comments

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/

jnbptstm avatar Jul 26 '23 12:07 jnbptstm

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.

  1. Find the secret for a helm release
  2. Read the secret's release field
  3. base64 decode the value
  4. Parse it as json
  5. 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"

yitsushi avatar Jul 26 '23 13:07 yitsushi

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

foot avatar Aug 01 '23 07:08 foot

We should be able to parse it from the Secret, without much additional cost.

bigkevmcd avatar Aug 01 '23 12:08 bigkevmcd