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
930 stars 153 forks source link

SPIKE: Behavior of OCI Helm Chart in Weave GitOps #2266

Closed JamWils closed 2 years ago

JamWils commented 2 years ago

As a user, I would like Helm with OCI support in Weave GitOps so that I could see which Helm Release was installed from which OCI image.

Technical bits

The new version of HelmRepository will support ".spec.type: oci" to indicate that the source of a HelmRelease will be an OCI image.

image

chanwit commented 2 years ago

The behavior needed by this spike has been done in https://github.com/weaveworks/weave-gitops/issues/2274

chanwit commented 2 years ago

Flux v0.31.1 has been released. Please make sure that we spike against this version: https://github.com/fluxcd/flux2/releases/tag/v0.31.1

ozamosi commented 2 years ago

Example config to make it show up:

---
apiVersion: v1
kind: Namespace
metadata:
  name: oci
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: podinfo-from-oci
  namespace: oci
spec:
  url: oci://ghcr.io/stefanprodan/charts
  type: "oci"
  interval: 1h
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: podinfo-from-oci
  namespace: oci
spec:
  chart:
    spec:
      chart: podinfo
      sourceRef:
        kind: HelmRepository
        name: podinfo-from-oci
      version: '6.1.*'
  interval: 1h

Current behaviour: Screenshot from 2022-06-08 17-57-48

Screenshot from 2022-06-08 17-36-09

Suggestions for immediate next steps:

Future pondering: I don't know how much I feel this way because I look at the UI more vs how much it is because I stare at the implementation all day, but I increasingly feel that the "Type: HelmRepository/Kustomization" etc in the table on every page is jarring. The best description I can think of is that the kind, name and namespace all identify the object, whereas the last updated time etc describe the object - by the time I decide to look at the table, I've already identified that this is the object I care about, so by definition it must be the "right" kind and namespace (spoiler: half the time I get confused and go to the wrong page, and then I swear). I think we should move the kind to the header like #2207 suggested. This is relevant for this ticket, as it'd free up the Type: key for the type of HelmRepository.