weaveworks / weave-gitops

Weave GitOps provides insights into your application deployments, and makes continuous delivery with GitOps easier to adopt and scale across your teams.
https://docs.gitops.weave.works/
Apache License 2.0
918 stars 153 forks source link

Display appVersion of Helm Release #3888

Open jnbptstm opened 1 year ago

jnbptstm commented 1 year ago

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/

yitsushi commented 1 year ago

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"
foot commented 1 year ago

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

bigkevmcd commented 1 year ago

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