Skip to content

Commit 2fed6ca

Browse files
authored
Add provider-specific manifests for BBR helm chart (#585)
1 parent d1d11f8 commit 2fed6ca

File tree

4 files changed

+114
-8
lines changed

4 files changed

+114
-8
lines changed

config/charts/body-based-routing/README.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,20 @@ A chart to the body-based routing deployment and service.
88
To install a body-based router named `body-based-router`, you can run the following command:
99

1010
```txt
11-
$ helm install body-based-router ./config/charts/body-based-routing
11+
$ helm install body-based-router ./config/charts/body-based-routing \
12+
--set provider.name=[gke|istio] \
13+
--set inference-gateway.name=inference-gateway
1214
```
1315

16+
Note that the provider name is needed to ensure provider-specific manifests are also applied. If no provider is specified, then only
17+
the deployment and service are deployed.
18+
1419
To install via the latest published chart in staging (--version v0 indicates latest dev version), you can run the following command:
1520

1621
```txt
17-
$ helm install body-based-router oci://us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension/charts/body-based-router --version v0
22+
$ helm install body-based-router oci://us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension/charts/body-based-router \
23+
--version v0
24+
--set provider.name=[gke|istio]
1825
```
1926

2027
## Uninstall
@@ -37,12 +44,9 @@ The following table list the configurable parameters of the chart.
3744
| `bbr.image.hub` | Registry URL where the image is hosted. |
3845
| `bbr.image.tag` | Image tag. |
3946
| `bbr.image.pullPolicy` | Image pull policy for the container. Possible values: `Always`, `IfNotPresent`, or `Never`. Defaults to `Always`. |
47+
| `provider.name` | Name of the Inference Gateway implementation being used. Possible values: `istio`, `gke`. Defaults to `none`. |
48+
| `inference-gateway.name` | The name of the Gateway. Defaults to `inference-gateway`. |
4049

4150
## Notes
4251

43-
This chart will only deploy the body-based router deployment and service.
44-
Note that this should only be deployed once per Gateway.
45-
46-
Additional configuration is needed to configure a proxy extension that calls
47-
out to the service in the request path. For example, vwith Envoy Gateway, this
48-
would require configuring EnvoyExtensionPolicy.
52+
This chart should only be deployed once per Gateway.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{- if eq .Values.provider.name "gke" }}
2+
---
3+
kind: GCPRoutingExtension
4+
apiVersion: networking.gke.io/v1
5+
metadata:
6+
name: {{ .Values.bbr.name }}
7+
namespace: {{ .Release.Namespace }}
8+
spec:
9+
targetRefs:
10+
- group: "gateway.networking.k8s.io"
11+
kind: Gateway
12+
name: {{ .Values.inference-gateway.name }}
13+
extensionChains:
14+
- name: chain1
15+
extensions:
16+
- name: ext1
17+
authority: "myext.com"
18+
timeout: 1s
19+
supportedEvents:
20+
- RequestHeaders
21+
- RequestBody
22+
- RequestTrailers
23+
requestBodySendMode: "FullDuplexStreamed"
24+
backendRef:
25+
group: ""
26+
kind: Service
27+
name: {{ .Values.bbr.name }}
28+
port: 9004
29+
---
30+
apiVersion: networking.gke.io/v1
31+
kind: HealthCheckPolicy
32+
metadata:
33+
name: bbr-healthcheck
34+
namespace: {{ .Release.Namespace }}
35+
spec:
36+
default:
37+
logConfig:
38+
enabled: true
39+
config:
40+
type: "GRPC"
41+
grpcHealthCheck:
42+
portSpecification: "USE_FIXED_PORT"
43+
port: 9005
44+
targetRef:
45+
group: ""
46+
kind: Service
47+
name: {{ .Values.bbr.name }}
48+
namespace: {{ .Release.Namespace }}
49+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{{- if eq .Values.provider.name "istio" }}
2+
---
3+
apiVersion: networking.istio.io/v1alpha3
4+
kind: EnvoyFilter
5+
metadata:
6+
name: {{ .Values.bbr.name }}
7+
namespace: {{ .Release.Namespace }}
8+
spec:
9+
configPatches:
10+
- applyTo: HTTP_FILTER
11+
match:
12+
# context omitted so that this applies to both sidecars and gateways
13+
listener:
14+
filterChain:
15+
filter:
16+
name: "envoy.filters.network.http_connection_manager"
17+
patch:
18+
operation: INSERT_FIRST
19+
value:
20+
name: envoy.filters.http.ext_proc
21+
typed_config:
22+
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor
23+
failure_mode_allow: false
24+
allow_mode_override: true
25+
processing_mode:
26+
request_header_mode: "SEND"
27+
response_header_mode: "SKIP"
28+
request_body_mode: "BUFFERED"
29+
response_body_mode: "NONE"
30+
request_trailer_mode: "SKIP"
31+
response_trailer_mode: "SKIP"
32+
grpc_service:
33+
envoy_grpc:
34+
cluster_name: outbound|9004||{{ .Values.bbr.name }}.default.svc.cluster.local
35+
---
36+
apiVersion: networking.istio.io/v1
37+
kind: DestinationRule
38+
metadata:
39+
name: {{ .Values.bbr.name }}
40+
namespace: {{ .Release.Namespace }}
41+
spec:
42+
host: {{ .Values.bbr.name }}.default.svc.cluster.local
43+
trafficPolicy:
44+
tls:
45+
mode: SIMPLE
46+
insecureSkipVerify: true
47+
{{- end }}

config/charts/body-based-routing/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ bbr:
77
tag: main
88
pullPolicy: Always
99
extProcPort: 9002
10+
11+
provider:
12+
name: none
13+
14+
inference-gateway:
15+
name: inference-gateway

0 commit comments

Comments
 (0)