-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable navigation from a UI to the Git source of a resource #1179
Comments
We talked about this one today. You seemed to have an idea on the solution. Could you please add some notes regarding that while the memory is still fresh? @ljakimczuk Thank you! |
Hey @marians, the support for something like this has been added in this PR, though this may not be the perfect solution, depending on the use case I guess. The |
I can't find any documentation for what |
Sure, you can try it yourself in the > ./tools/fake-flux-build build MC_NAME ORG_NAME WC_NAME_NO_OUT_OF_BAND apps/hello-world
apiVersion: application.giantswarm.io/v1alpha1
kind: App
metadata:
annotations:
config.kubernetes.io/origin: |
path: appcr.yaml
name: hello-world
namespace: org-
spec:
catalog: giantswarm
kubeConfig:
inCluster: false
name: hello-world-app
namespace: hello-world
version: 0.2.0 As you can see, the annotation is included in the final manifest, though it has little value because it points to the path relative to the About the docs, I haven't found good ones myself, but the help command explains it to some degree: > kustomize edit set buildmetadata --help
Sets one or more buildMetadata options to the kustomization.yaml in the current directory.
Existing options in the buildMetadata field will be replaced entirely by the new options set by this command.
The following options are valid:
- originAnnotations
- transformerAnnotations
- managedByLabel
originAnnotations will add the annotation config.kubernetes.io/origin to each resource, describing where
each resource originated from.
transformerAnnotations will add the annotation alpha.config.kubernetes.io/transformations to each resource,
describing the transformers that have acted upon the resource.
managedByLabel will add the label app.kubernetes.io/managed-by to each resource, describing which version
of kustomize managed the resource. |
Looks like that's indeed not helping us. We need a different solution then. |
I will check if there is something on the Flux's side that we could use. |
@ljakimczuk Any update on this? We have #624 in place now and offering a link to e. g. the GitHub UI for the repo would be a great improvement. |
Unfortunately there is nothing that can give the absolute path to the file in the repository. |
Is there at least a label or annotation or some source for the repo URL (without path)? |
None that I'm aware of. You can however locate the Kustomization thanks to the annotations you already have, and in this Kustomization find the reference to the source, and then get the URL from the source. See @uvegla comment in the ticket you linked: #624 (comment) |
That looks promosing, thanks! |
@gusevda We talked about this yesterday. I want to pick this up again and spec what we want to achieve, from the user perspective. |
User story
Details
In user interfaces like our web UI we want to offer users a way to quickly navigate to the Git source defining the resource, given that the resource is managed in a GitOps way.
Using our own cluster
c68pn
in installationgollum
as an example, the URL would be:https://github.com/giantswarm/workload-clusters-fleet/tree/main/management-clusters/gollum/organizations/giantswarm/workload-clusters/c68pn/cluster
For the
docs
app, the URL would be:https://github.com/giantswarm/workload-clusters-fleet/tree/main/management-clusters/gollum/organizations/giantswarm/workload-clusters/c68pn/apps/docs
The text was updated successfully, but these errors were encountered: