Skip to content

Commit

Permalink
Merge pull request #43 from Kuadrant/add-allowed-routes
Browse files Browse the repository at this point in the history
Add gateway.listeners.allowedRoutes.namespaces.from field
  • Loading branch information
david-martin committed Jun 10, 2024
2 parents ed0b6d9 + 5062849 commit 8924dcb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion METRICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gatewayapi_gateway_deleted{namespace="<NAMESPACE>",name="<GATEWAY>"} 1690879977
Per [Listener](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1beta1.Listener) information, Gauge

```promql
gatewayapi_gateway_listener_info{namespace="<NAMESPACE>",name="<GATEWAY>",listener_name="<LISTENER_NAME>",port="<PORT>",protocol="<PROTOCOL>",hostname="<HOSTNAME>","tls_mode"="<Passthrough|Terminate>"} 1
gatewayapi_gateway_listener_info{namespace="<NAMESPACE>",name="<GATEWAY>",listener_name="<LISTENER_NAME>",port="<PORT>",protocol="<PROTOCOL>",hostname="<HOSTNAME>","tls_mode"="<Passthrough|Terminate>","allowed_routes_namespaces_from"="<Same|All|Selector>"} 1
```

### gatewayapi_gateway_status
Expand Down
1 change: 1 addition & 0 deletions config/default/custom-resource-state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ spec:
protocol: ["protocol"]
hostname: ["hostname"]
tls_mode: ["tls","mode"]
allowed_routes_namespaces_from: ["allowedRoutes", "namespaces", "from"]
- name: "status"
help: "status condition"
each:
Expand Down
3 changes: 3 additions & 0 deletions config/examples/dashboards/gateways.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@
"port",
"protocol",
"tls_mode",
"allowed_routes_namespaces_from",
"Value"
]
}
Expand All @@ -363,6 +364,7 @@
},
"indexByName": {
"Value": 9,
"allowed_routes_namespaces_from": 10,
"customresource_kind": 0,
"customresource_version": 1,
"hostname": 5,
Expand All @@ -375,6 +377,7 @@
},
"renameByName": {
"Value": "",
"allowed_routes_namespaces_from": "Allowed Routes NS",
"customresource_kind": "Kind",
"customresource_version": "Version",
"hostname": "Hostname",
Expand Down
2 changes: 1 addition & 1 deletion config/examples/dashboards/gateways.yaml

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions config/examples/kube-prometheus/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ data:
protocol: ["protocol"]
hostname: ["hostname"]
tls_mode: ["tls","mode"]
allowed_routes_namespaces_from: ["allowedRoutes", "namespaces", "from"]
- name: "status"
help: "status condition"
each:
Expand Down Expand Up @@ -38672,6 +38673,7 @@ data:
"port",
"protocol",
"tls_mode",
"allowed_routes_namespaces_from",
"Value"
]
}
Expand All @@ -38685,6 +38687,7 @@ data:
},
"indexByName": {
"Value": 9,
"allowed_routes_namespaces_from": 10,
"customresource_kind": 0,
"customresource_version": 1,
"hostname": 5,
Expand All @@ -38697,6 +38700,7 @@ data:
},
"renameByName": {
"Value": "",
"allowed_routes_namespaces_from": "Allowed Routes NS",
"customresource_kind": "Kind",
"customresource_version": "Version",
"hostname": "Hostname",
Expand Down Expand Up @@ -39706,7 +39710,7 @@ data:
}
kind: ConfigMap
metadata:
name: grafana-gateways-6465t79fc4
name: grafana-gateways-dh56k7246b
namespace: monitoring

---
Expand Down Expand Up @@ -44585,7 +44589,7 @@ spec:
name: grafana-gatewayclasses
- configMap:
defaultMode: 420
name: grafana-gateways-6465t79fc4
name: grafana-gateways-dh56k7246b
name: grafana-gateways
- configMap:
defaultMode: 420
Expand Down
3 changes: 3 additions & 0 deletions src/dashboards/gateways.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ gwapi.dashboard('Gateways', 'gatewayapigateways', [
'port',
'protocol',
'tls_mode',
'allowed_routes_namespaces_from',
'Value',
],
},
Expand All @@ -109,6 +110,7 @@ gwapi.dashboard('Gateways', 'gatewayapigateways', [
port: 6,
protocol: 7,
tls_mode: 8,
allowed_routes_namespaces_from: 10
},
renameByName: {
Value: '',
Expand All @@ -122,6 +124,7 @@ gwapi.dashboard('Gateways', 'gatewayapigateways', [
prometheus: '',
protocol: 'Protocol',
tls_mode: 'TLS Mode',
allowed_routes_namespaces_from: 'Allowed Routes NS'
},
}),
]),
Expand Down

0 comments on commit 8924dcb

Please sign in to comment.