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

Link to kustomization / Helm Release location in git

Open sympatheticmoose opened this issue 3 years ago • 1 comments

Short description As an application operator I want to be able to easily navigate to the location of a given kustomization so that I can apply changes and fix issues.

Consider the Weave GitOps app as an example, say I've pinned a version in the HelmRelease and I need to change this value. I want to quickly navigate to where the object is defined so that I may take this action.

From the Applications details page this is what I can see: Screenshot 2022-05-06 at 13 58 05

There is nothing here which would help me navigate to the appropriate location in GitHub. Neither is this apparent through the source (HelmChart or HelmRepository)

Screenshot 2022-05-06 at 14 08 45 Screenshot 2022-05-06 at 14 08 30

A similar experience exists for kustomizations

This information could potentially be surfaced through the same mechanism as flux trace:

flux trace -n test helmrelease ww-gitops

Object:        HelmRelease/ww-gitops
Namespace:     test
Status:        Managed by Flux
---
Kustomization: flux-system
Namespace:     flux-system
Path:          ./clusters/rbac-test
Revision:      main/1312da654b66006bd8074d728a1dda3d80af0335
Status:        Last reconciled at 2022-05-06 13:59:50 +0100 BST
Message:       Applied revision: main/1312da654b66006bd8074d728a1dda3d80af0335
---
GitRepository: flux-system
Namespace:     flux-system
URL:           ssh://[email protected]/sympatheticmoose/fleet-infra
Branch:        main
Revision:      main/1312da654b66006bd8074d728a1dda3d80af0335
Status:        Last reconciled at 2022-05-05 00:25:01 +0100 BST
Message:       stored artifact for revision 'main/1312da654b66006bd8074d728a1dda3d80af0335'

Other mechanisms may exist - perhaps the same as the related automations view we build, but flipping the relationship. It would be fantastic if we could get a direct link to the given object's location.

Acceptance criteria

  • [ ] From a Kustomization / HelmRelease page, there is a link which takes the user to where this object is defined, or a way to navigate this path. For example a link to the kustomization which deployed this object and from there the source location.

sympatheticmoose avatar May 06 '22 13:05 sympatheticmoose

~@sympatheticmoose to update based on current UX~ experience is still broadly the same and I believe this enhancement could still provide value assuming we can come up with a reasonable design to inform the user. A workaround for now would be custom metadata on the Kustomization/HelmRelease to either denote the kustomization that deploys it to the cluster, or a direct URL to the manifest in git (but these would need to be provided by the user)

sympatheticmoose avatar Oct 17 '22 17:10 sympatheticmoose

@bia I think we could use some help here

sympatheticmoose avatar Nov 09 '22 10:11 sympatheticmoose

@sympatheticmoose could the UI solution here be as simple as adding a URL field above the Source field ?

Screenshot 2022-11-20 at 21 442

bia avatar Nov 21 '22 10:11 bia

Per @bigkevmcd: "while this would be great there’s no simple answer to 'where' a file comes from except for really simple cases. Fundamentally, when you render the files, they get built from multiple sources, and returned as a set of resources, You don’t get the files. We would need to build some sort of “ingester” similar to Backstage, but that would suffer from the same problem. Backstage can do this, because it has a simpler model.

lasomethingsomething avatar Aug 31 '23 16:08 lasomethingsomething

Closing as we won't go this route.

lasomethingsomething avatar Sep 14 '23 14:09 lasomethingsomething