Skip to content

Commit

Permalink
fix: add missing gnocchi route & patch for gw api
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeRepko committed Aug 12, 2024
1 parent c4708aa commit 398e731
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/openstack-barbican.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
> /etc/genestack/gateway-api/routes/custom-barbican-gateway-route.yaml
```

### Apply the Route
#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-barbican-gateway-route.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-cinder.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
> /etc/genestack/gateway-api/routes/custom-cinder-gateway-route.yaml
```

### Apply the Route
#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-cinder-gateway-route.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-glance.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
> /etc/genestack/gateway-api/routes/custom-glance-gateway-route.yaml
```

### Apply the Route
#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-glance-gateway-route.yaml
Expand Down
30 changes: 30 additions & 0 deletions docs/openstack-gnocchi.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,36 @@ helm upgrade --install gnocchi ./gnocchi \
You may need to provide custom values to configure your openstack services, for a simple single region or lab deployment you can supply an additional overrides flag using the example found at `base-helm-configs/aio-example-openstack-overrides.yaml`.
In other cases such as a multi-region deployment you may want to view the [Multi-Region Support](multi-region-support.md) guide to for a workflow solution.

### Custom Routes

!!! note "This step is not needed if all routes were applied when the Gateway API was deployed"

A custom gateway route can be used when setting up the service. The custom route make it possible to for a domain like `your.domain.tld` to be used for the service.

??? example "Example routes file found in `/opt/genestack/etc/gateway-api/routes`"

``` yaml
--8<-- "etc/gateway-api/routes/custom-keystone-gateway-route.yaml"
```

#### Modify the Route

This example changes the placeholder domain to `<YOUR_DOMAIN>`. Review the [gateway route documentation](https://gateway-api.sigs.k8s.io/api-types/httproute)
for more information on route types.

``` shell
mkdir -p /etc/genestack/gateway-api/routes
sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
/opt/genestack/etc/gateway-api/routes/custom-gnocchi-gateway-route.yaml \
> /etc/genestack/gateway-api/routes/custom-gnocchi-gateway-route.yaml
```

#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-gnocchi-gateway-route.yaml
```

## Validate the metric endpoint

### Pip install gnocchiclient and python-ceilometerclient
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-keystone.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
> /etc/genestack/gateway-api/routes/custom-keystone-gateway-route.yaml
```

### Apply the Route
#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-keystone-gateway-route.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-magnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
> /etc/genestack/gateway-api/routes/custom-magnum-gateway-route.yaml
```

### Apply the Route
#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-magnum-gateway-route.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-octavia.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
> /etc/genestack/gateway-api/routes/custom-octavia-gateway-route.yaml
```

### Apply the Route
#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-octavia-gateway-route.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-skyline.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
> /etc/genestack/gateway-api/routes/custom-skyline-gateway-route.yaml
```

### Apply the Route
#### Apply the Route

``` shell
kubectl --namespace openstack apply -f /etc/gateway-api/routes/custom-skyline-gateway-route.yaml
Expand Down
25 changes: 25 additions & 0 deletions etc/gateway-api/gateway-patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,5 +363,30 @@
"mode": "Terminate"
}
}
},
{
"op": "add",
"path": "/spec/listeners/-",
"value": {
"name": "gnocchi-https",
"port": 443,
"protocol": "HTTPS",
"hostname": "gnocchi.your.domain.tld",
"allowedRoutes": {
"namespaces": {
"from": "All"
}
},
"tls": {
"certificateRefs": [
{
"group": "",
"kind": "Secret",
"name": "gnocchi-gw-tls-secret"
}
],
"mode": "Terminate"
}
}
}
]
21 changes: 21 additions & 0 deletions etc/gateway-api/routes/custom-gnocchi-gateway-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: custom-gnocchi-gateway-route
namespace: openstack
labels:
application: gateway-api
service: HTTPRoute
route: gnocchi
spec:
parentRefs:
- name: flex-gateway
sectionName: gnocchi-https
namespace: nginx-gateway
hostnames:
- "gnocchi.your.domain.tld"
rules:
- backendRefs:
- name: gnocchi-api
port: 8041

0 comments on commit 398e731

Please sign in to comment.