Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
david-martin committed Sep 29, 2023
1 parent ff12698 commit b7e377c
Show file tree
Hide file tree
Showing 13 changed files with 2,820 additions and 1,143 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,23 @@ gatewayapi_udproute_parent_info{name="<UDPRoute_NAME>",namespace="<NAMESPACE>",p
gatewayapi_udproute_status_parent_info{name="<UDPRoute_NAME>",namespace="<NAMESPACE>",parent_group="<PARENT_GROUP>",parent_kind="<PARENT_KIND>",parent_name="<PARENT_NAME>",parent_namespace="<PARENT_NAMESPACE>"}
```

## Local dashboard development

Dashboards are written in jsonnet, and use the [grafonnet library](https://github.com/grafana/grafonnet).
Resulting dashboard json files are checked in.
To generate dashboards, run `make generate-dashboards`.

Local development can be done using a combination of automatic jsonnet execution
and using the [grafana-operator](https://github.com/grafana-operator/grafana-operator)
to automatically update dashboards in Grafana. This allows for a relatviely fast
development loop where you can change a dashboard jsonnet file, save it, then
see the changes automically in a browser.

To set up the local development environment, run the following:
```shell
./hack/local_dev.sh
```

## Contributing

Contributions are welcome in the form of bugs, feature requests & pull requests.
Expand Down
27 changes: 16 additions & 11 deletions config/examples/dashboards/gatewayclasses.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,6 @@
],
"title": "Supported Features (by GatewayClass)",
"transformations": [
{
"id": "reduce",
"options": {
"includeTimeField": false,
"labelsToFields": true,
"mode": "seriesToRows",
"reducers": [
"last"
]
}
},
{
"id": "filterFieldsByName",
"options": {
Expand Down Expand Up @@ -371,6 +360,22 @@
"name": "datasource",
"query": "prometheus",
"type": "datasource"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"includeAll": true,
"label": "GatewayClass",
"multi": true,
"name": "gatewayclass",
"query": {
"query": "label_values(gatewayapi_gatewayclass_info, name)",
"refId": "StandardVariableQuery"
},
"regex": "",
"type": "query"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion config/examples/dashboards/gatewayclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ spec:
matchLabels:
dashboards: "grafana"
json: >
{"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"Gateway Classes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of GatewayClasses across all clusters","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gatewayclass_info)","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total GatewayClasses with an Accepted state of True","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gatewayclass_status{type=\"Accepted\"} > 0)","instant":true}],"title":"Accepted","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gatewayclass_created","format":"table","instant":true,"range":false}],"title":"GatewayClasses","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true,"customresource_kind":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"links","value":[{"title":"Gateway Details","url":"/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}"}]},{"id":"custom.displayMode","value":"color-text"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gateway_info","format":"table","instant":true,"range":false}],"title":"Gateways (by GatewayClass)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["gatewayclass_name","name","namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":false,"customresource_kind":true},"indexByName":{"Value":3,"gatewayclass_name":2,"name":0,"namespace":1},"renameByName":{"Value":"# Instances","customresource_kind":"Kind","customresource_version":"Version","gatewayclass_name":"GatewayClass","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"name"},"properties":[{"id":"custom.width","value":333}]}]},"gridPos":{"h":6,"w":20,"x":4,"y":7},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gatewayclass_status_supported_features{name=\"$gatewayclass\"}","format":"table","instant":true,"range":false}],"title":"Supported Features (by GatewayClass)","transformations":[{"id":"reduce","options":{"includeTimeField":false,"labelsToFields":true,"mode":"seriesToRows","reducers":["last"]}},{"id":"filterFieldsByName","options":{"include":{"names":["features","name"]}}},{"id":"groupBy","options":{"fields":{"features":{"aggregations":["allValues"],"operation":"aggregate"},"name":{"aggregations":[],"operation":"groupby"}}}},{"id":"organize","options":{"excludeByName":{},"indexByName":{},"renameByName":{"features (allValues)":"Features","name":"GatewayClass"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / GatewayClasses","uid":"gatewayapigatewayclass"}
{"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"Gateway Classes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of GatewayClasses across all clusters","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gatewayclass_info)","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total GatewayClasses with an Accepted state of True","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gatewayclass_status{type=\"Accepted\"} > 0)","instant":true}],"title":"Accepted","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gatewayclass_created","format":"table","instant":true,"range":false}],"title":"GatewayClasses","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true,"customresource_kind":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"links","value":[{"title":"Gateway Details","url":"/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}"}]},{"id":"custom.displayMode","value":"color-text"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gateway_info","format":"table","instant":true,"range":false}],"title":"Gateways (by GatewayClass)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["gatewayclass_name","name","namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":false,"customresource_kind":true},"indexByName":{"Value":3,"gatewayclass_name":2,"name":0,"namespace":1},"renameByName":{"Value":"# Instances","customresource_kind":"Kind","customresource_version":"Version","gatewayclass_name":"GatewayClass","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"name"},"properties":[{"id":"custom.width","value":333}]}]},"gridPos":{"h":6,"w":20,"x":4,"y":7},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gatewayclass_status_supported_features{name=\"$gatewayclass\"}","format":"table","instant":true,"range":false}],"title":"Supported Features (by GatewayClass)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["features","name"]}}},{"id":"groupBy","options":{"fields":{"features":{"aggregations":["allValues"],"operation":"aggregate"},"name":{"aggregations":[],"operation":"groupby"}}}},{"id":"organize","options":{"excludeByName":{},"indexByName":{},"renameByName":{"features (allValues)":"Features","name":"GatewayClass"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"GatewayClass","multi":true,"name":"gatewayclass","query":{"query":"label_values(gatewayapi_gatewayclass_info, name)","refId":"StandardVariableQuery"},"regex":"","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / GatewayClasses","uid":"gatewayapigatewayclass"}
Loading

0 comments on commit b7e377c

Please sign in to comment.