Displaying Custom Metadata
Weave Gitops lets you add annotations with custom metadata to your flux automations and sources, and they will be displayed in the main UI.
For example, you might use this to add links to dashboards, issue systems, or documentation and comments that you wish to be directly visible in the GitOps UI.
We will use the
podinfo application that we installed in the getting
started guide as an example. Open up the
podinfo kustomization and add annotations to it so it looks like this:
Podinfo is a tiny web application made with Go that showcases best practices of running microservices in Kubernetes.
Podinfo is used by CNCF projects like Flux and Flagger for end-to-end testing and workshops.
Close the file, and commit and push your changes.
Back in your GitOps dashboard, navigate to the 'Applications' tab and select the
podinfo kustomization. At the bottom of the 'Details' section you will see the
new 'Metadata' entries:
- The annotation key must start with the domain
metadata.weave.works. Any other annotations will be ignored.
- The key that will be displayed is whatever you put after the
domain, title cased, and with dashes replaced with spaces. Above,
metadata.weave.works/grafana-dashboardwas displayed as "Grafana Dashboard".
- The value can either be a link, or can be plain text. Newlines in plain text will be respected.
- The key is subject to certain limitations that kubernetes imposes on
- it must be shorter than 63 characters (not including the domain)
- it must be an English alphanumeric character, or one of
- See the kubernetes documentation for the full list of restrictions.