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 system or another external system, or documentation and comments that are visible straight in the main 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.
When you open the gitops dashboard and navigate to the Kustomization details, you should see the following:
There are some restrictions to keep in mind:
- The annotation key has to 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 impose on
annotations - it must be shorter than 63 characters (not including
the domain), and must be an English alphanumeric character, or one of
-._. See the kubernetes documentation for the full list of restrictions.